net.tomp2p.peers
Interface PeerStatusListener

All Known Implementing Classes:
IdentityManagement, TrackerStorage

public interface PeerStatusListener


Nested Class Summary
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.
 
Method Summary
 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.
 

Method Detail

peerOffline

void peerOffline(PeerAddress peerAddress,
                 PeerStatusListener.Reason reason)
Called if the peer does not send multiple answer in time. This peer is considered offline

Parameters:
peerAddress - The address of the peer that went offline

peerFail

void peerFail(PeerAddress peerAddress,
              boolean force)
Called if the peer does not send answer in time. The peer may be busy, so there is a chance of seeing this peer again.

Parameters:
peerAddress - The address of the peer that failed
force - Set to true if we are sure that the peer died.

peerOnline

void peerOnline(PeerAddress peerAddress)
Called if the peer is online and we verified it. This method may get called many times, for each successful request.

Parameters:
peerAddress - The address of the peer that is online.


Copyright © 2013. All Rights Reserved.