Class StationaryAgent

java.lang.Object
  |
  +--StationaryAgent

public abstract class StationaryAgent
extends java.lang.Object
implements AgentItf

See Also:
AgentItf, Serialized Form

Field Summary
protected  java.lang.String homeHostName
          The host name of the home agent server.
protected  int homePortNumber
          The port number of the home agent server.
protected  java.lang.String name
          The name that identifies the agent.
 
Constructor Summary
StationaryAgent()
           
 
Method Summary
 java.lang.String getHomeHostName()
          Returns the host name of the agent's home agent server.
 int getHomePortNumber()
          Returns the port number of the agent's home agent server.
 java.lang.String getName()
          Returns the agent's name.
 void init(java.lang.String name, java.lang.String homeHostName, int homePortNumber)
          Initializes the agent with a name, and the host name and the port number of the agent server on which it is created.
 boolean isMobile()
          Tests if the agent is mobile.
 void run()
          This is the starting point of the agent; this method does nothing and returns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The name that identifies the agent.

homeHostName

protected java.lang.String homeHostName
The host name of the home agent server.

homePortNumber

protected int homePortNumber
The port number of the home agent server.
Constructor Detail

StationaryAgent

public StationaryAgent()
Method Detail

init

public void init(java.lang.String name,
                 java.lang.String homeHostName,
                 int homePortNumber)
Initializes the agent with a name, and the host name and the port number of the agent server on which it is created.

Specified by:
init in interface AgentItf
Parameters:
name - the name of the agent.
homeHostName - the host name of the agent server.
homePortNumber - the port number of the agent server.

getName

public java.lang.String getName()
Returns the agent's name.
Specified by:
getName in interface AgentItf
Returns:
the name of the agent.

getHomeHostName

public java.lang.String getHomeHostName()
Returns the host name of the agent's home agent server.
Specified by:
getHomeHostName in interface AgentItf
Returns:
host name of the home agent server.

getHomePortNumber

public int getHomePortNumber()
Returns the port number of the agent's home agent server.
Specified by:
getHomePortNumber in interface AgentItf
Returns:
port number of the home agent server.

isMobile

public boolean isMobile()
Tests if the agent is mobile.
Specified by:
isMobile in interface AgentItf
Returns:
FALSE.

run

public void run()
This is the starting point of the agent; this method does nothing and returns.

Subclasses of StationaryAgent should override this method.