com.reticular.agentBuilder.agent.perception
Class CommInfo

java.lang.Object
  |
  +--com.reticular.agentBuilder.agent.perception.CommInfo
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
CorbaCommInfo, ESpeakCommInfo, RmiCommInfo, SocketCommInfo

public abstract class CommInfo
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Abstract base class for storing the agent's communication information. This will be instantiated as an RmiCommInfo or SocketCommInfo.

See Also:
Serialized Form

Field Summary
static java.lang.String CORBA_COMM_TYPE
           
static int DEFAULT_CORBA_PORT
           
static int DEFAULT_ESPEAK_PORT
           
static int DEFAULT_RMI_PORT
           
static int DEFAULT_SOCKET_PORT
           
static java.lang.String ESPEAK_COMM_TYPE
           
static java.lang.String RMI_COMM_TYPE
           
static java.lang.String SOCKET_COMM_TYPE
           
 
Constructor Summary
CommInfo()
          Empty Constructor
 
Method Summary
 java.lang.Object clone()
          Calls the super.clone() from lang.obj and catches the exceptions.
abstract  boolean equals(java.lang.Object other)
          Returns true if the input object is a CommInfo object of the same type as *this* and if the values match.
abstract  java.lang.String getCommType()
          Get the comm type of this CommInfo object.
abstract  boolean getIsSupported()
          Returns true if commtype is supported by the agent.
abstract  int getPort()
          Get the comm port for this CommType
protected  int getRandomPort()
          Returns a random port number between 1000 and 6000.
abstract  java.lang.String toBNFString()
          Encodes the CommInfo object in a BNF compatible way.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RMI_COMM_TYPE

public static final java.lang.String RMI_COMM_TYPE

DEFAULT_RMI_PORT

public static final int DEFAULT_RMI_PORT

SOCKET_COMM_TYPE

public static final java.lang.String SOCKET_COMM_TYPE

DEFAULT_SOCKET_PORT

public static final int DEFAULT_SOCKET_PORT

CORBA_COMM_TYPE

public static final java.lang.String CORBA_COMM_TYPE

DEFAULT_CORBA_PORT

public static final int DEFAULT_CORBA_PORT

ESPEAK_COMM_TYPE

public static final java.lang.String ESPEAK_COMM_TYPE

DEFAULT_ESPEAK_PORT

public static final int DEFAULT_ESPEAK_PORT
Constructor Detail

CommInfo

public CommInfo()
Empty Constructor
Method Detail

toBNFString

public abstract java.lang.String toBNFString()
Encodes the CommInfo object in a BNF compatible way.
Returns:
String The BNF encoding of the RMI CommInfo object.

getCommType

public abstract java.lang.String getCommType()
Get the comm type of this CommInfo object.
Returns:
String

getPort

public abstract int getPort()
Get the comm port for this CommType
Returns:
int

getIsSupported

public abstract boolean getIsSupported()
Returns true if commtype is supported by the agent.
Returns:
boolean

equals

public abstract boolean equals(java.lang.Object other)
Returns true if the input object is a CommInfo object of the same type as *this* and if the values match.
Overrides:
equals in class java.lang.Object
Parameters:
other - - Object, a instance of a subclass of CommInfo
Returns:
boolean

clone

public java.lang.Object clone()
Calls the super.clone() from lang.obj and catches the exceptions.
Overrides:
clone in class java.lang.Object
Returns:
Object

getRandomPort

protected int getRandomPort()
Returns a random port number between 1000 and 6000.
Returns:
int The random port number.