|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Nest
is the interface used by nest users
to communicate with nests. The basic methods contained in this
interface enable the user to search resources, to insert
resources in the Anthill network and to add knowledge
about other nests.
Method Summary | |
void |
addAntNeighbour(NestId nid)
Adds the identifier of a new neighbour nest to the set of neighbours known to this nest, on behalf of an ant visiting the nest. |
void |
addClientNeighbour(NestId nid)
Adds the identifier of a new neighbour nest to the set of neighbours known to this nest, on behalf of the nest user. |
NestId |
getId()
Returns the identifier of this nest |
Manager |
getManager()
Returns the Manager object associated to this nest |
Neighbour[] |
getNeighbours()
Returns information about the neighbours known to this nest. |
Storage |
getStorage(java.lang.String name)
Obtains a storage reference from the nest. |
void |
insert(Resource resource)
Inserts a new resource in this nest. |
void |
removeNeighbour(NestId nid)
Removes the identifier of a neighbour nest from the set of neighbours known to this Nest. |
void |
request(RequestId rid,
java.lang.Object request,
ResponseListener listener)
Accepts a resource request originated by the user of this nest. |
Methods inherited from interface anthill.util.Clearable |
clear |
Method Detail |
public NestId getId()
public Manager getManager()
Manager
object associated to this nestpublic Storage getStorage(java.lang.String name) throws StorageNotFoundException
name
- name of the storage to obtain a reference to.Storage
referenceStorageNotFoundException
- if the specified name does not
correspond to a storage currently available from this nest.public void request(RequestId rid, java.lang.Object request, ResponseListener listener)
Resource
object will be returned to the specified resource listener.request
- the request to be satisfiedlistener
- The listener object which will be notified
when the request is completed.public void insert(Resource resource)
The exact behavior of this method depends on the implementation of the resource storage contained in the nest. Please refer to the documentation of the resource storage implementation for more details.
resource
- the resource to be inserted.public void addClientNeighbour(NestId nid)
The exact behavior of this method depends on the implementation of the gate object contained in the nest. Please refer to the documentation of the resource storage implementation for more details.
nid
- the identifier of the neighbour to be addedpublic void addAntNeighbour(NestId nid)
The exact behavior of this method depends on the implementation of the gate object contained in the nest. Please refer to the documentation of the resource storage implementation for more details.
nid
- the identifier of the neighbour to be addedpublic void removeNeighbour(NestId nid)
The exact behavior of this method depends on the implementation of the gate object contained in the nest. Please refer to the documentation of the resource storage implementation for more details.
nid
- the identifier of the neighbour to be removedpublic Neighbour[] getNeighbours()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |