net.openai.ai.hybrid.fsmagent
Class MigrateState

java.lang.Object
  |
  +--net.openai.util.fsm.State
        |
        +--net.openai.ai.hybrid.fsmagent.AgentState
              |
              +--net.openai.ai.hybrid.fsmagent.InputForwardingState
                    |
                    +--net.openai.ai.hybrid.fsmagent.MigrateState
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SimpleMigrateState

public abstract class MigrateState
extends InputForwardingState

See Also:
Serialized Form

Constructor Summary
MigrateState()
          Constructs a new MigrateState without a destination host or port.
 
Method Summary
protected  java.lang.Object executeState()
          The main body of the MigrateState's execution.
abstract  java.lang.String getDestinationHost()
          Returns the destination host name or IP.
abstract  int getDestinationPort()
          Returns the port on the destination host to enter through.
 
Methods inherited from class net.openai.ai.hybrid.fsmagent.InputForwardingState
enter, exit, getInputData
 
Methods inherited from class net.openai.ai.hybrid.fsmagent.AgentState
displayMessage, getAgent
 
Methods inherited from class net.openai.util.fsm.State
addStateListener, addTransition, addTransition, getEndStateFlag, getName, getStartStateFlag, getTransitions, removeStateListener, removeTransition, setEndStateFlag, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MigrateState

public MigrateState()
Constructs a new MigrateState without a destination host or port.

Method Detail

getDestinationHost

public abstract java.lang.String getDestinationHost()
Returns the destination host name or IP.

Returns:
The destination host name or IP.

getDestinationPort

public abstract int getDestinationPort()
Returns the port on the destination host to enter through.

Returns:
The port on the destination host to enter through.

executeState

protected final java.lang.Object executeState()
                                       throws java.lang.Exception
The main body of the MigrateState's execution. This is the method that actually does the migration. If, for some reason, this method is invoked outside of the agent's thread of execution, a NullPointerException will the thrown.

Specified by:
executeState in class AgentState
Returns:
Boolean.TRUE if the migration was successful, Boolean.FALSE if it was not.
java.lang.Exception


Copyright - 2001 OpenAI Labs. All Rights Reserved.