com.reticular.agentBuilder.agent.mentalState
Class Agent

java.lang.Object
  |
  +--com.reticular.agentBuilder.agent.mentalState.Agent
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

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

Description : The Agent class stores the information about an agent, e.g., the agent's name, address, the agencies to which it belongs, its communication type, etc.

See Also:
Serialized Form

Constructor Summary
Agent(AgentInfo agentInfo)
          Description : TEMPORARY Constructor for the Agent object, to be used until we develop support for arrays.
Agent(AgentInfo agentInfo, java.lang.String[] agencies)
          Description : Constructor for the Agent object.
 
Method Summary
 java.lang.Object clone()
          Description : Clone the Agent object
 boolean equals(java.lang.Object agent)
          Description : If its the correct type and the fields are equals then return true.
 AgentInfo getAgentInfo()
          Description : Returns a reference to the AgentInfo object stored in this Agent object.
 java.lang.String getCommType()
          Description : Get the current comm type.
 java.lang.String getIPAddress()
          Description : Get the current IP address.
 java.security.KeyPair getKeyPair()
          Description : Get the current key pair.
 java.lang.String getName()
          Description : Get the current agent name.
 java.security.PrivateKey getPrivateKey()
          Description : Get the private key from the current key pair.
 java.security.PublicKey getPublicKey()
          Description : Get the public key from the current key pair.
 java.lang.String getUserName()
          Description : getter
 void print()
          Description : Print the agent name and address.
 void setAgentInfo(AgentInfo agentInfo)
          Description : Set the reference in this Agent object to the input AgentInfo object.
 void setIPAddress(java.lang.String IPAddress)
          Description : Set the IP address to the input string.
 void setKeyPair(java.security.KeyPair keyPair)
          Description : Set the key pair to the input key pair.
 void setName(java.lang.String agentName)
          Description : Set the agent name to the input string.
 void setUserName(java.lang.String newName)
          Description : setter
 java.lang.String toBNFString()
          Description :
 java.lang.String toString()
          Description :
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Agent

public Agent(AgentInfo agentInfo,
             java.lang.String[] agencies)
Description : Constructor for the Agent object.
Throws:
-  

Agent

public Agent(AgentInfo agentInfo)
Description : TEMPORARY Constructor for the Agent object, to be used until we develop support for arrays. The array arg for the agencies has been omitted.
Throws:
-  
Method Detail

equals

public boolean equals(java.lang.Object agent)
Description : If its the correct type and the fields are equals then return true.
Overrides:
equals in class java.lang.Object
Parameters:
Object - The instance to compare against.
Returns:
boolean

setUserName

public void setUserName(java.lang.String newName)
Description : setter
Parameters:
newName - - The new name of the user.
Returns:
void

getUserName

public java.lang.String getUserName()
Description : getter
Parameters:
-  
Returns:
String The name of the user of the agent..

getAgentInfo

public AgentInfo getAgentInfo()
Description : Returns a reference to the AgentInfo object stored in this Agent object.
Returns:
AgentInfo
Throws:
-  

setAgentInfo

public void setAgentInfo(AgentInfo agentInfo)
Description : Set the reference in this Agent object to the input AgentInfo object.
Parameters:
agentInfo - - AgentInfo
Returns:
void
Throws:
-  

getName

public java.lang.String getName()
Description : Get the current agent name.
Returns:
String
Throws:
-  

setName

public void setName(java.lang.String agentName)
Description : Set the agent name to the input string.
Parameters:
agentName - - String
Returns:
void
Throws:
-  

getIPAddress

public java.lang.String getIPAddress()
Description : Get the current IP address. This may be a host name, such as quincy.reticular.com, or an address such as 199.106.0.6.
Returns:
String
Throws:
-  

setIPAddress

public void setIPAddress(java.lang.String IPAddress)
Description : Set the IP address to the input string. This may be a host name, such as quincy.reticular.com, or an address such as 199.106.0.6.
Parameters:
IPAddress - - String
Returns:
void
Throws:
-  

getCommType

public java.lang.String getCommType()
Description : Get the current comm type.
Returns:
String
Throws:
-  

getKeyPair

public java.security.KeyPair getKeyPair()
Description : Get the current key pair.
Returns:
KeyPair
Throws:
-  

setKeyPair

public void setKeyPair(java.security.KeyPair keyPair)
Description : Set the key pair to the input key pair.
Parameters:
keyPair - - KeyPair
Returns:
void
Throws:
-  

getPublicKey

public java.security.PublicKey getPublicKey()
Description : Get the public key from the current key pair.
Returns:
PublicKey
Throws:
-  

getPrivateKey

public java.security.PrivateKey getPrivateKey()
Description : Get the private key from the current key pair.
Returns:
PrivateKey
Throws:
-  

clone

public java.lang.Object clone()
Description : Clone the Agent object
Overrides:
clone in class java.lang.Object
Returns:
Object
Throws:
-  

print

public void print()
Description : Print the agent name and address.
Returns:
void
Throws:
-  

toString

public java.lang.String toString()
Description :
Overrides:
toString in class java.lang.Object
Returns:
String

toBNFString

public java.lang.String toBNFString()
Description :
Returns:
String