|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines a set of methods which should be implemented for periodically collecting information about other peers (Nests). The main method is discoverNest(). It should use JXTA's PDP in the jxta implementation of Anthill to get new advertisements; once one has been found the method mkNestId() generates a NestId for the nest just discovered. The next step is adding it to the list of known nests via the addKnownNest() method.
Method Summary | |
void |
addKnownNest(NestId id)
When a new nest has been found, a call to this method will just record the new NestId associated to the nest. |
void |
discoverNest()
This method is used to collect peer advertisements. |
NestId |
getDestNestId()
This method should be invoked by a Nest instance in order to know to which Nest an ant wil be sent. |
NestId |
mkNestId(Advertisement adv)
When a new PeerAdvertisement is found, it is handled to this method to extract a valid NestId from it, since that's the smallest information we need to get connected to other nests. |
void |
run()
The run method will just periodically call the discoverNest() method and then go to sleep for a specified amount of time. |
Method Detail |
public NestId getDestNestId()
public void run()
public void addKnownNest(NestId id)
public void discoverNest()
public NestId mkNestId(Advertisement adv)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |