Example #1
0
 private void fireFailedConnection(SharingPeer peer, Throwable cause) {
   for (IncomingConnectionListener listener : this.listeners) {
     listener.handleFailedConnection(peer, cause);
   }
 }
Example #2
0
 /**
  * Trigger the new peer connection event on all registered listeners.
  *
  * @param socket The socket to the newly connected peer.
  * @param peerId The peer ID of the connected peer.
  */
 private void fireNewPeerConnection(Socket socket, byte[] peerId) {
   for (IncomingConnectionListener listener : this.listeners) {
     listener.handleNewPeerConnection(socket, peerId);
   }
 }