com.reticular.agentBuilder.agent.perception
Class RmiCommInfo

java.lang.Object
  |
  +--com.reticular.agentBuilder.agent.perception.CommInfo
        |
        +--com.reticular.agentBuilder.agent.perception.RmiCommInfo
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

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

Class provides the information needed to initialize RMI communications.

See Also:
Serialized Form

Fields inherited from class com.reticular.agentBuilder.agent.perception.CommInfo
CORBA_COMM_TYPE, DEFAULT_CORBA_PORT, DEFAULT_ESPEAK_PORT, DEFAULT_RMI_PORT, DEFAULT_SOCKET_PORT, ESPEAK_COMM_TYPE, RMI_COMM_TYPE, SOCKET_COMM_TYPE
 
Constructor Summary
RmiCommInfo()
          Creates a RmiCommInfo with a random port number between 1000 and 6000.
RmiCommInfo(int port)
          Constructor for RmiCommInfo
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this object.
 boolean equals(java.lang.Object other)
          Returns true if the input object is an RmiCommInfo object and if the _rmiRegistryPort values match.
 java.lang.String getCommType()
          Get the comm type of this actual agent info object.
 boolean getIsSupported()
          Indicates whether this agent will support this comm type.
 int getPort()
          Get the port the registry is using.
 int getRmiRegistryPort()
          Get the port the registry is using.
 void setIsSupported(boolean isSupported)
          Indicates whether this agent will support this comm type.
 void setRmiRegistryPort(int port)
          Sets the rmiregistry port.
 java.lang.String toBNFString()
          Encodes the RmiCommInfo object in a BNF compatible way.
 
Methods inherited from class com.reticular.agentBuilder.agent.perception.CommInfo
getRandomPort
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RmiCommInfo

public RmiCommInfo()
Creates a RmiCommInfo with a random port number between 1000 and 6000.

RmiCommInfo

public RmiCommInfo(int port)
Constructor for RmiCommInfo
Parameters:
int -  
boolean -  
Method Detail

equals

public boolean equals(java.lang.Object other)
Returns true if the input object is an RmiCommInfo object and if the _rmiRegistryPort values match.
Overrides:
equals in class CommInfo
Parameters:
other - - Object, a instance of a subclass of CommInfo
Returns:
boolean

toBNFString

public java.lang.String toBNFString()
Encodes the RmiCommInfo object in a BNF compatible way.
NOTE: The keypair is NOT being printed out right now. When we implement security we'll need to decide upon the correct ascii representation.
Overrides:
toBNFString in class CommInfo
Returns:
String The BNF encoding of the RMI agent info object.

getCommType

public java.lang.String getCommType()
Get the comm type of this actual agent info object.
Overrides:
getCommType in class CommInfo
Returns:
String

getPort

public int getPort()
Get the port the registry is using.
Overrides:
getPort in class CommInfo
Returns:
int - The port number.

setIsSupported

public void setIsSupported(boolean isSupported)
Indicates whether this agent will support this comm type.
Parameters:
boolean -  

getIsSupported

public boolean getIsSupported()
Indicates whether this agent will support this comm type.
Overrides:
getIsSupported in class CommInfo
Returns:
boolean

getRmiRegistryPort

public int getRmiRegistryPort()
Get the port the registry is using.
Returns:
Int - The port number.

setRmiRegistryPort

public void setRmiRegistryPort(int port)
Sets the rmiregistry port.
Parameters:
port - - The port number. Defaults to 1199.

clone

public java.lang.Object clone()
Returns a clone of this object.
Overrides:
clone in class CommInfo
Returns:
Object