net.openai.ai.agent
Class MobileAgent
java.lang.Object
|
+--net.openai.ai.agent.Agent
|
+--net.openai.ai.agent.MobileAgent
- All Implemented Interfaces:
- AgentConstants, java.io.Serializable
- Direct Known Subclasses:
- FSMAgent
- public abstract class MobileAgent
- extends Agent
- implements java.io.Serializable
This is the base class for all Mobile Agents. In order to utilize the
mobility of the Agent, you must make sure that all data that is not
transient is able to be Serialized. See the Java SDK Javadocs for more
information on Serialization (java.io.Serializable).
- See Also:
- Serialized Form
Constructor Summary |
MobileAgent()
Constructs a new MobileAgent. |
Method Summary |
protected void |
migrateTo(java.net.InetAddress host,
int port)
Causes the Agent to migrate from one machine to another. |
protected void |
migrateTo(java.lang.String host,
int port)
Causes the Agent to migrate from one machine to another. |
Methods inherited from class net.openai.ai.agent.Agent |
displayMessage, executeAgent, getAgentDescription, getAgentID, getAgentNumber, getDaemon, getLogStream, getRunState, getShortDescription, getSpawnHostIP, getSpawnHostName, getSpawnTime, halt, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MobileAgent
public MobileAgent()
- Constructs a new MobileAgent.
migrateTo
protected final void migrateTo(java.lang.String host,
int port)
throws java.io.IOException,
java.net.UnknownHostException
- Causes the Agent to migrate from one machine to another. This can only
be called from within a MobileAgent's execution. If the migration is
successful, the agent's execution is immediately halted.
- Parameters:
host
- The destination host.port
- The port on the destination host to enter through.
- Throws:
java.io.IOException
- If an IOException has occurred during the
transmission.
java.net.UnknownHostException
- If the host name is not known.
migrateTo
protected final void migrateTo(java.net.InetAddress host,
int port)
throws java.io.IOException
- Causes the Agent to migrate from one machine to another. This can only
be called from within a MobileAgent's execution. If the migration is
successful, the agent's execution is immediately halted.
- Parameters:
host
- The destination host.port
- The port on the destination host to enter through.
- Throws:
java.io.IOException
- If an IOException has occurred during the
transmission.
Copyright - 2001 OpenAI Labs. All Rights Reserved.