agentland.software
Class ExecAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.resource.ManagedAgent
|
+--agentland.software.ExecAgent
- All Implemented Interfaces:
- Agent, Exec, Good, Managed, MetagluePrimitives, Remote, Serializable, Spy
- Direct Known Subclasses:
- LaureteAgent
- public abstract class ExecAgent
- extends ManagedAgent
- implements Exec
Exec Agent
The Intelligent Room/HAL Project
MIT Artificial Intelligence Laboratory
Cambridge, MA
- See Also:
- Serialized Form
Constructor Summary |
ExecAgent()
Tie to the proper machine, homie! |
Method Summary |
protected String |
getCommand()
Return the command to exec. |
void |
killProgram()
Kill the program. |
boolean |
programAlive()
Is program alive or dead? |
protected void |
programDied(boolean killed)
This is called if the program has passed away. |
void |
startProgram()
Start the program, unless it is already running. |
Methods inherited from class agentland.resource.ManagedAgent |
connect, getAlert, getNeed, isAvailable, isAvailable, reliesOn, reliesOn, replace, replace, request, request, request, requestAgent, requestAgent, resources, resourcesByAgentID, setNeed, tiedTo, yank, yank, yank |
Methods inherited from class agentland.util.GoodAgent |
addSpy, addSpy, alert, alertString, beep, error, getHistory, getHistoryElement, getPersistentMap, log, notify, removeSpy, removeSpy, resetHistory, safeRely, safeRely, safeRely, setNiceLogName, tell |
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, lookupClass, reliesOn, reliesOnSynch, removeAPHFromCatalog, removeFrozen, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, toString, whereAreYou |
Methods inherited from interface agentland.util.Spy |
tell |
command
protected Runtime command
process
protected Process process
startCount
protected int startCount
- Number of times program has been started.
ExecAgent
public ExecAgent()
throws RemoteException
- Tie to the proper machine, homie!
programAlive
public boolean programAlive()
throws RemoteException
- Is program alive or dead?
- Specified by:
programAlive
in interface Exec
killProgram
public void killProgram()
- Description copied from interface:
Exec
- Kill the program.
- Specified by:
killProgram
in interface Exec
programDied
protected void programDied(boolean killed)
- This is called if the program has passed away.
- Parameters:
killed
- true if someone explicitly killed it via this
agent.
startProgram
public void startProgram()
throws RemoteException
- Start the program, unless it is already running.
- Specified by:
startProgram
in interface Exec
getCommand
protected String getCommand()
- Return the command to exec. Can be overridden, currently
checks for an attribute "command"