agentland.util.launcher
Class LauncherAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.launcher.LauncherAgent
- All Implemented Interfaces:
- Agent, Launcher, MetagluePrimitives, Remote, Serializable
- public class LauncherAgent
- extends AgentAgent
- implements Launcher
A Launcher agent can start other agents or query to see if they are running.
Launcher is general enough to respond to requests regarding specific
AgentID's, although such generality is probably useful only in very special
circumstances (you're prolly better off calling reliesOn() yourself).
The list of agents it knows about are stashed in a persistant map. This
maps Strings ==> AgentIDs, where the string is representative of the agent;
eg. "MapDisplaySpeech" ==> maps.speechin.MapDisplaySpeech
- See Also:
- Serialized Form
Fields inherited from interface agentland.util.launcher.Launcher |
ERROR |
Methods inherited from class metaglue.AgentAgent |
addMonitor, alive, buildEHAFor, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getOldLogs, getProperties, getProxyHandlerClass, getSociety, installAPH, log, log, log, lookupClass, reliesOn, reliesOn, reliesOn, reliesOnSynch, removeAPHFromCatalog, removeFrozen, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, toString, whereAreYou |
LauncherAgent
public LauncherAgent()
throws RemoteException
startAgent
public boolean startAgent(String aName)
throws RemoteException
- Attempts to start the agent. Returns true if all goes well or false if
name could not be resolved or an error occurs
- Specified by:
startAgent
in interface Launcher
- Parameters:
aName
- The name of the agent to start
queryAgent
public int queryAgent(String aName)
throws RemoteException
- Returns true if the agent referred to by this name is running; false if
the agent is not running or the name could not be resolved
- Specified by:
queryAgent
in interface Launcher
- Following copied from interface:
agentland.util.launcher.Launcher
- See Also:
Agent
queryAgent
protected int queryAgent(AgentID aid)
throws RemoteException
launchableAgents
public Vector launchableAgents()
throws RemoteException
- Returns the vector of names (not agent ID's) of agents that can be
started through this agent
- Specified by:
launchableAgents
in interface Launcher
whois
public AgentID whois(String agentname)
throws RemoteException
- Given a name, it returns the agentID of the corresponding agent
(or null of name could not be resolved)
- Specified by:
whois
in interface Launcher
removeLaunchableAgent
public void removeLaunchableAgent(String text)
throws RemoteException
- Remove the name from the database
- Specified by:
removeLaunchableAgent
in interface Launcher
addLaunchableAgent
public void addLaunchableAgent(String spoken_text,
AgentID agentid)
throws RemoteException
- Adds an association between a name and an agentID. If the name already
exists pointing to some agent, this method will override the previous
association.
- Specified by:
addLaunchableAgent
in interface Launcher
- Parameters:
spoken_text
- the name to be used when referring the agentagentid
- Agent's ID