|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jxtaimpl.GateService
This is a Jxta-Enabled-Service. This class implements the Gate interface and is meant for receiving ants coming from other nests.
| Field Summary |
| Fields inherited from interface anthill.nest.Gate |
NAME |
| Constructor Summary | |
GateService()
|
|
| Method Summary | |
void |
clear()
Restores the object to its initial state. |
Advertisement |
getImplAdvertisement()
This method returns the GateService ModImplAdvertisement |
Service |
getInterface()
This method returns the Service interface |
NestId |
getNestId()
Returns the id associated with the nest this Gate belongs to |
void |
init(PeerGroup grp,
ID id,
Advertisement adv)
The init method will be invoked by the Jxta platform during the AnthillGroup initialization process. |
void |
send(NestId dest,
Ant ant,
int ttl)
This is the method which allows ants to be moved from nest to nest. |
void |
setAntListener(AntListener antListnr)
This method sets a reference to the instance which is willing to accept ants coming from other nests. |
int |
startApp(String[] args)
The startApp method will start the GateServiceServer and the GateServiceReceiver threads. |
void |
stopApp()
Method for shutting the service down. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GateService()
| Method Detail |
public void init(PeerGroup grp,
ID id,
Advertisement adv)
public int startApp(String[] args)
public void stopApp()
public Service getInterface()
public Advertisement getImplAdvertisement()
public NestId getNestId()
getNestId in interface Gate
public void send(NestId dest,
Ant ant,
int ttl)
throws IOException
send in interface Gatedest - The jxtaimpl.ids.NestId ID of the destination nestant - The Ant to be sentttl - This ant's TTL value
IOException - raised if problems have occurred during serialization
and sendingpublic void setAntListener(AntListener antListnr)
setAntListener in interface GateantListnr - the listener object that will
accepts the ants coming from other nestspublic void clear()
Clearable
clear in interface Clearable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||