public interface PeerStatusListener
Modifier and Type | Interface and Description |
---|---|
static class |
PeerStatusListener.Reason
The reason NOT_REACHABLE means that the peer is offline and cannot be
contacted, while REMOVED_FROM_MAP means that this peer has been removed
from the neigbhor list, but may still be reachable.
|
Modifier and Type | Method and Description |
---|---|
void |
peerFail(PeerAddress peerAddress,
boolean force)
Called if the peer does not send answer in time.
|
void |
peerOffline(PeerAddress peerAddress,
PeerStatusListener.Reason reason)
Called if the peer does not send multiple answer in time.
|
void |
peerOnline(PeerAddress peerAddress)
Called if the peer is online and we verified it.
|
void peerOffline(PeerAddress peerAddress, PeerStatusListener.Reason reason)
peerAddress
- The address of the peer that went offlinevoid peerFail(PeerAddress peerAddress, boolean force)
peerAddress
- The address of the peer that failedforce
- Set to true if we are sure that the peer died.void peerOnline(PeerAddress peerAddress)
peerAddress
- The address of the peer that is online.Copyright © 2013. All Rights Reserved.