net.tomp2p.p2p
Class IdentityManagement

java.lang.Object
  extended by net.tomp2p.p2p.IdentityManagement
All Implemented Interfaces:
PeerStatusListener

public class IdentityManagement
extends Object
implements PeerStatusListener


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.tomp2p.peers.PeerStatusListener
PeerStatusListener.Reason
 
Constructor Summary
IdentityManagement(PeerAddress self)
           
 
Method Summary
 boolean checkIdentity(Number160 peerId, PublicKey publicKey)
           
 PeerAddress getPeerAddress()
           
 Number160 getSelf()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityManagement

public IdentityManagement(PeerAddress self)
Method Detail

checkIdentity

public boolean checkIdentity(Number160 peerId,
                             PublicKey publicKey)

peerOffline

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

Specified by:
peerOffline in interface PeerStatusListener
Parameters:
peerAddress - The address of the peer that went offline

peerFail

public void peerFail(PeerAddress peerAddress,
                     boolean force)
Description copied from interface: PeerStatusListener
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.

Specified by:
peerFail in interface PeerStatusListener
Parameters:
peerAddress - The address of the peer that failed
force - Set to true if we are sure that the peer died.

peerOnline

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

Specified by:
peerOnline in interface PeerStatusListener
Parameters:
peerAddress - The address of the peer that is online.

getSelf

public Number160 getSelf()

getPeerAddress

public PeerAddress getPeerAddress()


Copyright © 2013. All Rights Reserved.