|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Gate
interface contains the set of methods
used by a nest to communicate with other nests.
Gate
is one of the components of a nest; the
other are Manager
), RequestSet
,
Storage
and Trail
.
Gate
methods are invoked by AntView
objects to implement methods move()
,
addNeighbour
, getNeighbours
and removeNeighbour()
. The exact behavior of
these methods depends on the implementation of Gate
.
Method Summary | |
NestId |
getId()
Returns the identifier of the nest containing this gate. |
void |
send(NestId dest,
Ant ant,
int ttl)
Sends an ant to the specified nest. |
void |
setAntListener(AntListener listener)
Sets the ant listener, i.e. the object that will accept the ants coming from other nests. |
Methods inherited from interface anthill.util.Clearable |
clear |
Method Detail |
public NestId getId()
public void setAntListener(AntListener listener)
listener
- the listener object that will
accepts the ants coming from other nestspublic void send(NestId dest, Ant ant, int ttl) throws java.io.IOException, java.lang.ClassCastException
java.lang.ClassCastException
- raised if the nest identifier does not belong to the
expected classjava.io.IOException
- raised if problems have occurred during serialization
and sending
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |