|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--anthill.nestor.LocalRequestSet
This class is a simple implementation of ResourceSet
containing an hash table mapping ant identifiers to response
listeners.
Constructor Summary | |
LocalRequestSet()
Constructor |
Method Summary | |
void |
add(AntId aid,
ResponseListener listener)
Adds an association between ant identifier and the listener interested in the responses returned by this ant. |
void |
clear()
Restores the object to its initial state. |
void |
returnResources(AntId aid,
Resource[] resources)
Returns the specified resources to the listener associated to the given ant identifier. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LocalRequestSet()
Method Detail |
public void add(AntId aid, ResponseListener listener)
RequestSet
add
in interface RequestSet
anthill.nest.RequestSet
aid
- the ant identifierlistener
- the listener which will be notified when
a response is availablepublic void returnResources(AntId aid, Resource[] resources)
RequestSet
returnResources
in interface RequestSet
anthill.nest.RequestSet
aid
- the ant identifierresources
- the resources found.public void clear()
clear
in interface Clearable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |