public class ContainerID extends java.lang.Object implements Location
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_IMTP
String constant identifying the JADE default Internal Message
Transport Protocol, connecting different containers within the
same JADE platform.
|
Constructor and Description |
---|
ContainerID()
The default costructor builds an uninitialized container ID.
|
ContainerID(java.lang.String n,
jade.mtp.TransportAddress a)
Build a container ID with the given container name and
transport address.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Equality operation over container IDs.
|
java.lang.String |
getAddress()
Retrieve the IP address of the host, the described container is running on.
|
java.lang.String |
getID()
Retrieve a string identifying the described container.
|
java.lang.Boolean |
getMain() |
java.lang.String |
getName()
Retrieve the name of the described container.
|
java.lang.String |
getPort() |
java.lang.String |
getProtocol()
Retrieves the IMTP protocol used to reach the described container.
|
int |
hashCode()
Hash code operation, compliant with identity-by-name.
|
void |
setAddress(java.lang.String a)
Set the IP address (as a string) of the host, the described container is running on.
|
void |
setMain(java.lang.Boolean main) |
void |
setName(java.lang.String n)
Set the name of the described container.
|
void |
setPort(java.lang.String port) |
void |
setProtocol(java.lang.String p)
Set the IMTP protocol used to reach the described
container.
|
java.lang.String |
toString()
Retrieve a string representation for this container ID.
|
public static final java.lang.String DEFAULT_IMTP
public ContainerID()
public ContainerID(java.lang.String n, jade.mtp.TransportAddress a)
n
- The name of the described container.a
- The network address of the node where the described
container is deployed.public void setName(java.lang.String n)
n
- The name to give to the described container.public java.lang.String getName()
public void setProtocol(java.lang.String p)
p
- The name of the chosen IMTP protocol.public java.lang.String getProtocol()
getProtocol
in interface Location
public void setAddress(java.lang.String a)
a
- The string representation of the IP address of the host, the described container is running on.public java.lang.String getAddress()
getAddress
in interface Location
public java.lang.String getPort()
public void setPort(java.lang.String port)
public java.lang.String getID()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
ContainerID
objects are considered equal if and
only if their name is the same (a case insensitive string
comparison is used.equals
in class java.lang.Object
obje
- The right hand side of the equality operation, the
left hand side being the current object.obj
parameter is an instance of
ContainerID
class and has the same name (case
insensitively) as the current object, then true
is
returned. Otherwise, this method returns false
.public int hashCode()
hashCode
in class java.lang.Object
public void setMain(java.lang.Boolean main)
public java.lang.Boolean getMain()