code: private static void removeDataEventListenerFromPeer(Peer peer, PeerDataEventListener listener) {
          peer.removeBlocksDownloadedEventListener(listener);
          peer.removeChainDownloadStartedEventListener(listener);
          peer.removeGetDataEventListener(listener);
          peer.removePreMessageReceivedEventListener(listener);
      }
docs: Remove a registered data event listener against a single peer (i.e. for
  blockchain download). Handling registration/deregistration on peer death/add is
  outside the scope of these methods.