|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | 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.
| Field Summary | |
static String |
NAME
Identifier used in the configuration files |
| Method Summary | |
NestId |
getNestId()
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 |
| Field Detail |
public static final String NAME
| Method Detail |
public NestId getNestId()
public void setAntListener(AntListener listener)
listener - the listener object that will
accepts the ants coming from other nests
public void send(NestId dest,
Ant ant,
int ttl)
throws IOException,
ClassCastException
ClassCastException - raised if the nest identifier does not belong to the
expected class
IOException - raised if problems have occurred during serialization
and sending
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||