|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.protocols.JMS.JMSAddress
Simple Address
representing the JMS node ID or JMS topic group.
Constructor Summary | |
JMS.JMSAddress()
Empty constructor to allow externalization work. |
|
JMS.JMSAddress(java.lang.String str)
Reconstruct the address from the string representation. |
|
JMS.JMSAddress(java.lang.String address,
boolean isMCast)
Create instance of this class for given address string. |
Method Summary | |
protected java.lang.Object |
clone()
Clone the object. |
int |
compareTo(java.lang.Object o)
Compare this object to o . |
boolean |
equals(java.lang.Object obj)
Test is this object is equal to obj . |
java.lang.String |
getAddress()
Get the node address. |
int |
hashCode()
Get the hash code of this address. |
boolean |
isMulticastAddress()
Is the address a multicast address? |
void |
readExternal(java.io.ObjectInput in)
Read object from external input. |
void |
setAddress(java.lang.String address)
Set the node address. |
java.lang.String |
toString()
Get the string representation of the address. |
void |
writeExternal(java.io.ObjectOutput out)
Write the object to external output. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JMS.JMSAddress(java.lang.String address, boolean isMCast)
'#'
to determine
if the address is a unicast or multicast. Therefore, this character is
considered as reserved and is not allowed in the address
parameter passed to the #JMSAddress(String, boolean)
constructor.
address
- string representing the address of the node connected
to the JMS topic, usually, a value of
connection.getClientID()
, where the connection is
instance of javax.jms.TopicConnection
.isMCast
- true
if the address is multicast address,
otherwise - false
.public JMS.JMSAddress()
public JMS.JMSAddress(java.lang.String str)
str
starts with '#'
, address is considered
as unicast, and node address is the substring after '#'
.
Otherwise, address is multicast and address is str
itself.
str
- string used to reconstruct the instance.Method Detail |
public java.lang.String getAddress()
#JMSAddress(String, boolean)
.public void setAddress(java.lang.String address)
address
- new node address.public boolean isMulticastAddress()
isMulticastAddress
in interface Address
true
if the address is multicast address.protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
o
. It is possible to compare only
addresses of the same class. Also they both should be either
multicast or unicast addresses.
compareTo
in interface java.lang.Comparable
Comparable.compareTo(Object)
specififaction.
java.lang.ClassCastException
public boolean equals(java.lang.Object obj)
obj
.
true
iff the obj
is
JMSAddress
, node addresses are equal and they both are
either multicast or unicast addresses.public int hashCode()
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.String toString()
a2.equals(a1)
is always true
, where
a2
is
JMSAddress a2 = new JMSAddress(a1.toString());
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |