|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.core.dht.router.DHTRouterWrapper
public class DHTRouterWrapper
Constructor Summary | |
---|---|
DHTRouterWrapper(DHTRouter _delegate)
|
Method Summary | |
---|---|
boolean |
addObserver(DHTRouterObserver rto)
Adds a routing table observer if it is not already observing. |
void |
contactAlive(byte[] node_id,
DHTRouterContactAttachment attachment)
Adds a contact to the router and marks it as "known to be alive" |
DHTRouterContact |
contactDead(byte[] node_id,
boolean force)
Informs the router that an attempt to interact with the contact failed |
void |
contactKnown(byte[] node_id,
DHTRouterContactAttachment attachment,
boolean force)
Adds a contact to the router. |
boolean |
containsObserver(DHTRouterObserver rto)
Returns whether the given observer is already observing. |
void |
destroy()
|
List<DHTRouterContact> |
findBestContacts(int max)
returns a list of best contacts in terms of uptime, best first |
List<DHTRouterContact> |
findClosestContacts(byte[] node_id,
int num_to_return,
boolean live_only)
Returns num_to_return or a few more closest contacts, unordered |
DHTRouterContact |
findContact(byte[] node_id)
|
List<DHTRouterContact> |
getAllContacts()
Returns a list of DHTRouterContact objects |
protected DHTRouter |
getDelegate()
|
byte[] |
getID()
|
int |
getK()
|
DHTRouterContact |
getLocalContact()
|
DHTRouterStats |
getStats()
|
boolean |
isID(byte[] node_id)
|
void |
print()
|
void |
recordLookup(byte[] node_id)
|
void |
refreshIdleLeaves(long idle_max)
|
byte[] |
refreshRandom()
|
boolean |
removeObserver(DHTRouterObserver rto)
Removes the observer if it is already observing. |
boolean |
requestPing(byte[] node_id)
|
void |
seed()
Tells the router to perform its "start of day" functions required to integrate it into the DHT (search for itself, refresh buckets) |
void |
setAdapter(DHTRouterAdapter _adapter)
|
void |
setSleeping(boolean sleeping)
|
void |
setSuspended(boolean susp)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DHTRouterWrapper(DHTRouter _delegate)
Method Detail |
---|
protected DHTRouter getDelegate()
public int getK()
getK
in interface DHTRouter
public byte[] getID()
getID
in interface DHTRouter
public boolean isID(byte[] node_id)
isID
in interface DHTRouter
public DHTRouterContact getLocalContact()
getLocalContact
in interface DHTRouter
public void setAdapter(DHTRouterAdapter _adapter)
setAdapter
in interface DHTRouter
public void seed()
DHTRouter
seed
in interface DHTRouter
public void contactKnown(byte[] node_id, DHTRouterContactAttachment attachment, boolean force)
DHTRouter
contactKnown
in interface DHTRouter
public void contactAlive(byte[] node_id, DHTRouterContactAttachment attachment)
DHTRouter
contactAlive
in interface DHTRouter
public DHTRouterContact contactDead(byte[] node_id, boolean force)
DHTRouter
contactDead
in interface DHTRouter
public DHTRouterContact findContact(byte[] node_id)
findContact
in interface DHTRouter
public List<DHTRouterContact> findClosestContacts(byte[] node_id, int num_to_return, boolean live_only)
DHTRouter
findClosestContacts
in interface DHTRouter
public void recordLookup(byte[] node_id)
recordLookup
in interface DHTRouter
public boolean requestPing(byte[] node_id)
requestPing
in interface DHTRouter
public void refreshIdleLeaves(long idle_max)
refreshIdleLeaves
in interface DHTRouter
public byte[] refreshRandom()
refreshRandom
in interface DHTRouter
public List<DHTRouterContact> findBestContacts(int max)
DHTRouter
findBestContacts
in interface DHTRouter
public List<DHTRouterContact> getAllContacts()
DHTRouter
getAllContacts
in interface DHTRouter
public DHTRouterStats getStats()
getStats
in interface DHTRouter
public void setSleeping(boolean sleeping)
setSleeping
in interface DHTRouter
public void setSuspended(boolean susp)
setSuspended
in interface DHTRouter
public void destroy()
destroy
in interface DHTRouter
public void print()
print
in interface DHTRouter
public boolean addObserver(DHTRouterObserver rto)
DHTRouter
addObserver
in interface DHTRouter
rto
- the observer to add
true
if now observing, false
otherwisepublic boolean containsObserver(DHTRouterObserver rto)
DHTRouter
containsObserver
in interface DHTRouter
rto
- the observer to query as observing
true
if observing, false
otherwisepublic boolean removeObserver(DHTRouterObserver rto)
DHTRouter
removeObserver
in interface DHTRouter
rto
- the observer to remove
true
if no longer observing, false
otherwise
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |