com.aelitis.azureus.core.dht.router
Class DHTRouterContactWrapper

java.lang.Object
  extended by com.aelitis.azureus.core.dht.router.DHTRouterContactWrapper
All Implemented Interfaces:
DHTRouterContact

public class DHTRouterContactWrapper
extends Object
implements DHTRouterContact


Constructor Summary
DHTRouterContactWrapper(DHTRouterContact _contact)
           
 
Method Summary
 DHTRouterContactAttachment getAttachment()
           
protected  DHTRouterContact getDelegate()
           
 byte[] getID()
           
 String getString()
           
 long getTimeAlive()
          time between first establishing the contact was alive and now, assuming that its not failing.
 boolean hasBeenAlive()
          indicates whether or not a message has been received from, or an operation has successfully been made to, the contact.
 boolean isAlive()
          Whether or not the contact's last interaction was successful
 boolean isBucketEntry()
          Returns whether this router contact is in a bucket.
 boolean isFailing()
          Whether or not the contact has failed once or more since last alive (if ever)
 boolean isReplacement()
          Returns whether this router contact is a replacement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DHTRouterContactWrapper

public DHTRouterContactWrapper(DHTRouterContact _contact)
Method Detail

getDelegate

protected DHTRouterContact getDelegate()

getID

public byte[] getID()
Specified by:
getID in interface DHTRouterContact

getAttachment

public DHTRouterContactAttachment getAttachment()
Specified by:
getAttachment in interface DHTRouterContact

hasBeenAlive

public boolean hasBeenAlive()
Description copied from interface: DHTRouterContact
indicates whether or not a message has been received from, or an operation has successfully been made to, the contact.

Specified by:
hasBeenAlive in interface DHTRouterContact
Returns:

isFailing

public boolean isFailing()
Description copied from interface: DHTRouterContact
Whether or not the contact has failed once or more since last alive (if ever)

Specified by:
isFailing in interface DHTRouterContact
Returns:

isAlive

public boolean isAlive()
Description copied from interface: DHTRouterContact
Whether or not the contact's last interaction was successful

Specified by:
isAlive in interface DHTRouterContact
Returns:

getTimeAlive

public long getTimeAlive()
Description copied from interface: DHTRouterContact
time between first establishing the contact was alive and now, assuming that its not failing. 0 -> failing

Specified by:
getTimeAlive in interface DHTRouterContact
Returns:

getString

public String getString()
Specified by:
getString in interface DHTRouterContact

isBucketEntry

public boolean isBucketEntry()
Description copied from interface: DHTRouterContact
Returns whether this router contact is in a bucket.

Specified by:
isBucketEntry in interface DHTRouterContact
Returns:
true if in a bucket, false otherwise

isReplacement

public boolean isReplacement()
Description copied from interface: DHTRouterContact
Returns whether this router contact is a replacement.

Specified by:
isReplacement in interface DHTRouterContact
Returns:
true if a replacement, false otherwise