|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcat.sig.Agent
This class represents an Agent in CAT. And agent is merely a person running CAT, or in other words is a single device running CAT. Agent is then a way to identify the different people/devices using CAT.
Field Summary | |
private java.lang.String |
host
the host that the agent is on. |
private java.lang.String |
id
the id of the agent. |
private int |
port
the port number the agent communicates on. |
private Profile |
profile
Optional information about the agent to share with other agents. |
Constructor Summary | |
Agent(java.lang.String id,
int port)
This constructor initializes the agent with basic information about the agent. |
|
Agent(java.lang.String id,
int port,
Profile p)
This constructor initializes the agent with basic information about the agent. |
|
Agent(java.lang.String id,
int port,
java.lang.String host)
This constructor initializes the agent with basic information about the agent. |
|
Agent(java.lang.String id,
int port,
java.lang.String host,
Profile p)
This constructor initializes the agent with basic information about the agent. |
Method Summary | |
boolean |
equals(Agent a)
returns true if the agents have the same id. |
boolean |
equals(java.lang.Object o)
returns true if the agents have the same ID. |
java.lang.String |
getHost()
Returns the agents host name. |
java.lang.String |
getId()
Returns the agent's id. |
int |
getPort()
Returns the agents port number. |
Profile |
getProfile()
|
void |
setProfile(Profile p)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.lang.String id
private int port
private java.lang.String host
private Profile profile
Constructor Detail |
public Agent(java.lang.String id, int port)
id
- The name of the agent.port
- The port this agent using for communicating
with other agents.public Agent(java.lang.String id, int port, java.lang.String host)
id
- The name of the agent.port
- The port this agent using for communicating
with other agents.host
- The host name this agent uses.public Agent(java.lang.String id, int port, java.lang.String host, Profile p)
id
- The name of the agent.port
- The port this agent using for communicating
with other agents.host
- The host name this agent uses.public Agent(java.lang.String id, int port, Profile p)
id
- The name of the agent.port
- The port this agent using for communicating
with other agents.Method Detail |
public int getPort()
public java.lang.String getId()
public java.lang.String getHost()
public boolean equals(java.lang.Object o)
o
-
public boolean equals(Agent a)
a
-
public java.lang.String toString()
public Profile getProfile()
public void setProfile(Profile p)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |