Interface MobileAgentItf

All Known Implementing Classes:
MobileAgent

public interface MobileAgentItf
extends AgentItf

See Also:
AgentItf

Method Summary
 void comeBackHome()
          The mobile agent comes back to its home agent server.
 java.lang.String getCurrentHostName()
          Returns the host name of the agent's current agent server.
 int getCurrentPortNumber()
          Returns the port number of the agent's current agent server.
 void meet(java.lang.String otherAgentName)
          The mobile agent joins another agent identified by a name.
 void moveTo(java.lang.String hostName, int hostPort)
          The mobile agent moves to an agent server identified by a name and a port number.
 void setCurrentHostName(java.lang.String hostName)
          Sets the value of the Returns the host name of the agent's current agent server name.
 void setCurrentPortNumber(int portNumber)
          Sets the value of the Returns the host name of the agent's current agent server port.
 void waitFor(java.lang.String otherAgentName)
          The mobile agent waits for the arrival of another agent identified by a name.
 
Methods inherited from interface AgentItf
getHomeHostName, getHomePortNumber, getName, init, isMobile
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

moveTo

public void moveTo(java.lang.String hostName,
                   int hostPort)
The mobile agent moves to an agent server identified by a name and a port number.
Parameters:
hostName - the target agent server's host name.
hostPort - the target agent server's port number.

comeBackHome

public void comeBackHome()
The mobile agent comes back to its home agent server.

waitFor

public void waitFor(java.lang.String otherAgentName)
The mobile agent waits for the arrival of another agent identified by a name. The mobile agent blocks until the other agent arrives.
Parameters:
otherAgentName - the name of the agent the mobile agent is waiting for.

meet

public void meet(java.lang.String otherAgentName)
The mobile agent joins another agent identified by a name. The mobile agent moves to the agent server hosting the target agent.
Parameters:
otherAgentName - the name of the agent the mobile agent is joining.

getCurrentHostName

public java.lang.String getCurrentHostName()
Returns the host name of the agent's current agent server.
Returns:
host name of the current agent server.

getCurrentPortNumber

public int getCurrentPortNumber()
Returns the port number of the agent's current agent server.
Returns:
port number of the current agent server.

setCurrentHostName

public void setCurrentHostName(java.lang.String hostName)
Sets the value of the Returns the host name of the agent's current agent server name.
Parameters:
hostName - name of the current agent server.

setCurrentPortNumber

public void setCurrentPortNumber(int portNumber)
Sets the value of the Returns the host name of the agent's current agent server port.
Parameters:
portNumber - port number of the current agent server.