|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.openai.ai.agent.Agent
This class is the base class for all Agents. Even though this class implements the Serializable interface, it is not "mobile". If an instance of this class is sent to a host, it will not be automatically started like the MobileAgent class will. The reason that it does implement the Serializable interface is to retain inner data for when the MobileAgent migrates. If it did not, this data will be lost in the serialization process.
Field Summary |
Fields inherited from interface net.openai.ai.agent.AgentConstants |
AGENT_CONTINUE, AGENT_RETURN_TO_SENDER, AGENT_START |
Constructor Summary | |
Agent()
Constructs a new Agent. |
Method Summary | |
protected void |
displayMessage(java.lang.String msg)
Displays a message. |
protected abstract void |
executeAgent()
Implement this method to provide functionality for the Agent. |
java.lang.String |
getAgentDescription()
Returns a description of the Agent. |
java.lang.String |
getAgentID()
Returns the unique ID of that the Agent was assigned at its spawn time. |
long |
getAgentNumber()
Returns the number of the agent as it was created on its source host. |
protected Daemon |
getDaemon()
Returns the Daemon that started the Agent or received the agent from another host. |
protected java.io.PrintStream |
getLogStream()
Returns the log stream for the local Daemon. |
protected int |
getRunState()
Returns the run state for the Agent as defined in the AgentConstants interface. |
java.lang.String |
getShortDescription()
Returns a short description of the Agent. |
java.lang.String |
getSpawnHostIP()
Returns the IP of the host that the agent was spawned on. |
java.lang.String |
getSpawnHostName()
Returns the name of the host that the agent was spawned on. |
long |
getSpawnTime()
Returns the time the agent was spawned on the spawning host. |
protected void |
halt()
Causes the Agent to halt execution. |
java.lang.String |
toString()
Returns the Agent as a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Agent()
Method Detail |
protected final int getRunState()
AgentConstants
interface.
AgentConstants
protected abstract void executeAgent() throws java.lang.Exception
java.lang.Exception
protected final Daemon getDaemon()
public final java.lang.String getSpawnHostName()
public final java.lang.String getSpawnHostIP()
public final long getSpawnTime()
public final long getAgentNumber()
public final java.lang.String getAgentID()
public java.lang.String getAgentDescription()
public java.lang.String getShortDescription()
protected void halt()
public java.lang.String toString()
getAgentID()
method.
toString
in class java.lang.Object
protected final java.io.PrintStream getLogStream()
protected final void displayMessage(java.lang.String msg)
msg
- The message to display.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |