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
- 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,
reliesOn,
reliesOn,
replace,
request,
request,
request,
requestAgent,
requestAgent,
resources,
resourcesByAgentID,
setNeed,
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,
defrost,
defrostAll,
defrostBoolean,
defrostInt,
defrostString,
fixAttribute,
fixAttribute,
freeze,
freeze,
freeze,
freezeAll,
freezeVar,
getAgentID,
getAttribute,
getCatalog,
getCatalogID,
getDesignation,
getFrozenVariables,
getLogLevel,
getMetaglueAgent,
getMetaglueAgentID,
getOccupation,
getProperties,
getSociety,
log,
log,
obtainMetaglueAgent,
obtainMetaglueAgent,
obtainMetaglueAgentByName,
reliesOn,
reliesOnSynch,
removeFrozen,
replaceExceptionHandler,
setFreezeName,
setLogLevel,
setLogName,
shutdown,
startAgent,
startAgentOn,
startAgentOn,
startup,
status,
tiedTo,
tiedTo,
tiedTo,
tiedTo,
tieToDesignation,
whereAreYou |
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"