|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.adf.agent.AID
public class AID
Acording to FIPA00023 an Agent Identifier (AID) identifies an agent through an extensible collection of parameter-value pairs.
An AID comprises:
The parameter values of an AID can be edited or modified by an agent, for example, to update the sequence of name resolution servers or transport addresses in an AID. However, the name parameter can only be changed by the agent to whom the AID belongs.
Only the name property is mandatory in an AID.
| Constructor Summary | |
|---|---|
AID(java.lang.String name,
boolean isGUID)
Constructs a new AID with the name given by the first argument. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Creates and returns a copy of this agent identifier. |
int |
compareTo(java.lang.Object o)
Compares this agent identifier with another agent identifier. |
boolean |
equals(java.lang.Object o)
Indicates whether some other agent identifier is equivalent to this one. |
java.util.List<java.net.URI> |
getAddresses()
A transport address is a physical address at which an agent can be contacted and is usually specific to a Message Transport Protocol. |
java.lang.String |
getHap()
|
java.lang.String |
getLocalName()
|
java.lang.String |
getName()
The name of the agent is a globally unique identifier that can be used as a unique referring expression of the agent. |
static java.lang.String |
getPlatformID()
The value of the platform identifier is appended to local names after a "@" character to obtain globally unique identifiers out of a local names. |
java.util.List<AID> |
getResolvers()
Note: No agent may contain itself as a resolver. |
java.util.Properties |
getUserDefinedProperties()
|
int |
hashCode()
Hash code. |
void |
setLocalName(java.lang.String localName)
This method sets the name of an agent by receiveing just a local name. |
void |
setName(java.lang.String globalName)
The name of the agent is a globally unique identifier that can be used as a unique referring expression of the agent. |
static void |
setPlatformID(java.lang.String id)
The value of the platform identifier is appended to local names after a "@" character to obtain globally unique identifiers out of a local names. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AID(java.lang.String name,
boolean isGUID)
Constructs a new AID with the name given by the first argument.
name - A name for this agent.isGUID - Should be true when the name agument is a globally
unique identifier for this agent and false when name is a local name.| Method Detail |
|---|
public java.lang.Object clone()
Creates and returns a copy of this agent identifier.
clone in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - Another AID to be compared with this AID.
public boolean equals(java.lang.Object o)
Indicates whether some other agent identifier is equivalent to this one. Two AIDs are considered to be equivalent if their name parameters are the same, ignoring case.
equals in class java.lang.Objectpublic java.util.List<java.net.URI> getAddresses()
A transport address is a physical address at which an agent can be contacted and is usually specific to a Message Transport Protocol. A given agent may support many methods of communication and can put multiple transport address values in the addresses parameter of an AID.
Note: According to FIPA the syntax of a transport addresses is the same as for a URL given in [RFC2396]. However the this poses unnecessary restrictions on the format of the address. ADF uses java.net.URIs as transport address, but if FIPA conformance is desired their use should be restricted to valid URLs only.
public java.lang.String getHap()
public java.lang.String getLocalName()
public java.lang.String getName()
The name of the agent is a globally unique identifier that can be used as a unique referring expression of the agent.
public static final java.lang.String getPlatformID()
The value of the platform identifier is appended to local names after a "@" character to obtain globally unique identifiers out of a local names.
public java.util.List<AID> getResolvers()
public java.util.Properties getUserDefinedProperties()
public int hashCode()
AID objects with equal names or with names differing only
in case have the same hash code.
hashCode in class java.lang.ObjectAID object.public void setLocalName(java.lang.String localName)
This method sets the name of an agent by receiveing just a local name. The globally unique identifier for this platform as returned by getPlatformID is appended after a "@" character to obtain a globally unique identifier.
localName - A local name for this agent.public void setName(java.lang.String globalName)
The name of the agent is a globally unique identifier that can be used as a unique referring expression of the agent. This method allows the setting of this GUID so extra care must be taken.
globalName - A globally unique name for this agent.public static final void setPlatformID(java.lang.String id)
The value of the platform identifier is appended to local names after a "@" character to obtain globally unique identifiers out of a local names.
id - A globally unique identifier for this platform.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||