Package org.bitcoinj.core.listeners
Interface PeerDisconnectedEventListener
-
public interface PeerDisconnectedEventListener
Implementors can listen to events indicating a peer disconnecting.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onPeerDisconnected(Peer peer, int peerCount)
Called when a peer is disconnected.
-
-
-
Method Detail
-
onPeerDisconnected
void onPeerDisconnected(Peer peer, int peerCount)
Called when a peer is disconnected. Note that this won't be called if the listener is registered on aPeerGroup
and the group is in the process of shutting down. If this listener is registered to aPeer
instead of aPeerGroup
, peerCount will always be 0. This handler can be called without a corresponding invocation of onPeerConnected if the initial connection is never successful.- Parameters:
peer
-peerCount
- the total number of connected peers
-
-