agentland.resource.namer
Interface Namer

All Known Implementing Classes:
NamerAgent

public interface Namer
extends Good, ResourceManager


Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Method Summary
 void addTranslation(String start, String target)
           
 void addWatchedOccupation(String s)
           
 boolean clearTranslation(String trans)
          Remove translation from lists.
 boolean clearWatchedOccupation(String occ)
          Remove watched occupation from list.
 AgentID translate(AgentID start_id)
          Given an ID, translate it into a new ID.
 AgentID translate(String start_id)
           
 
Methods inherited from interface agentland.util.Good
getHistory, getHistoryElement, resetHistory
 
Methods inherited from interface agentland.resource.ResourceManager
addRequestHook, connect, getAgentNames, lookup, registerInstance, removeRequestHook, replaceFor, request
 
Methods inherited from interface agentland.util.Spy
tell
 

Method Detail

translate

public AgentID translate(AgentID start_id)
                  throws RemoteException
Given an ID, translate it into a new ID. Uses two persistent maps. "translations" is a list of known translations from agentID to agentID. "watchedOccupations" is a list of which occupations demand a query. If an id is on the watched list, and no translation is known, the system will query user for the new agentID and store it for further use. (Does via promptbox, so it needs a display.)

translate

public AgentID translate(String start_id)
                  throws RemoteException

addWatchedOccupation

public void addWatchedOccupation(String s)
                          throws RemoteException

addTranslation

public void addTranslation(String start,
                           String target)
                    throws RemoteException

clearTranslation

public boolean clearTranslation(String trans)
                         throws RemoteException
Remove translation from lists.
Returns:
true if found and removed.

clearWatchedOccupation

public boolean clearWatchedOccupation(String occ)
                               throws RemoteException
Remove watched occupation from list.
Returns:
true if found and removed.