|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
I am convinced that we need a somewhat sophisticated name resolution scheme for our agents. This interface and the corresponding agent are an attempt to solve the problem. This system allows:
Agent
Fields inherited from interface metaglue.Agent |
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING |
Method Summary | |
boolean |
addChild(AgentID child,
boolean permanent)
Adds a child resolver -- the child resolvers will be queried if the name could not be resolved by this agent. |
boolean |
addName(Serializable thing,
Serializable name)
Allows you to add a name to a thing |
boolean |
addNames(Serializable thing,
Collection names)
|
boolean |
forgetAll()
Tells the resolver to forget all of the name-thing bindings |
Collection |
getAllNames()
|
Collection |
getAllNames(Serializable thing)
Get all the names for the thing |
Collection |
getAllNamesForThings(Collection things)
Get all the names for all the things passed in as the argument |
Collection |
getAllThings()
|
Serializable |
getUniqueName(Serializable thing)
Get the unique name for the thing |
Serializable |
getUniqueName(Serializable thing,
Collection context)
|
boolean |
removeChild(AgentID child)
Removes the child (if it was a permanent child, the removal will be permanent) |
boolean |
removeName(Serializable thing,
Serializable name)
Remove a name from the list of alternative names for the thing |
boolean |
removeThing(Serializable thing)
Remove all names for the thing |
Collection |
resolveName(Serializable name)
Returns all things associated with the name |
Methods inherited from interface agentland.resource.Managed |
getNeed, replace, replace, resources, yank, yank |
Methods inherited from interface agentland.util.Good |
getHistory, getHistoryElement, resetHistory |
Methods inherited from interface metaglue.Agent |
addMonitor, alive, getAgentID, getMetaglueAgentID, getOldLogs, shutdown, startup, whereAreYou |
Methods inherited from interface agentland.util.Spy |
tell |
Method Detail |
public boolean addName(Serializable thing, Serializable name) throws RemoteException
public boolean addNames(Serializable thing, Collection names) throws RemoteException
public boolean removeName(Serializable thing, Serializable name) throws RemoteException
public Serializable getUniqueName(Serializable thing) throws RemoteException
public Serializable getUniqueName(Serializable thing, Collection context) throws RemoteException
public Collection getAllNames(Serializable thing) throws RemoteException
public Collection getAllNamesForThings(Collection things) throws RemoteException
public boolean removeThing(Serializable thing) throws RemoteException
public Collection resolveName(Serializable name) throws RemoteException
public boolean addChild(AgentID child, boolean permanent) throws RemoteException
child
- the agent id of the child resovlerpermanent
- true if the association is to be made
permanent (i.e. frozen); false if this is a one-time dealpublic boolean removeChild(AgentID child) throws RemoteException
public boolean forgetAll() throws RemoteException
public Collection getAllNames() throws RemoteException
public Collection getAllThings() throws RemoteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |