public static class JMS.JMSAddress extends java.lang.Object implements Address
Address representing the JMS node ID or JMS topic group.| Constructor and Description |
|---|
JMS.JMSAddress()
Empty constructor to allow externalization work.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
readFrom(java.io.DataInputStream instream)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
void |
setAddress(java.lang.String address)
Set the node address.
|
int |
size()
Returns serialized size of this address
|
java.lang.String |
toString()
Get the string representation of the address.
|
void |
writeExternal(java.io.ObjectOutput out)
Write the object to external output.
|
void |
writeTo(java.io.DataOutputStream outstream)
Write the entire state of the current object (including superclasses) to outstream.
|
public JMS.JMSAddress()
public java.lang.String getAddress()
JMS.JMSAddress(String, boolean).public void setAddress(java.lang.String address)
address - new node address.public boolean isMulticastAddress()
isMulticastAddress in interface Addresstrue if the address is multicast address.public int size()
Addressprotected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic 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.ComparableComparable.compareTo(Object)
specififaction.java.lang.ClassCastExceptionpublic boolean equals(java.lang.Object obj)
obj.equals in class java.lang.Objecttrue iff the obj is
JMSAddress, node addresses are equal and they both are
either multicast or unicast addresses.public int hashCode()
hashCode in class java.lang.Objectpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic java.lang.String toString()
a2.equals(a1) is always true, where
a2 is
JMSAddress a2 = new JMSAddress(a1.toString());toString in class java.lang.Objectpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void writeTo(java.io.DataOutputStream outstream)
throws java.io.IOException
StreamablewriteTo in interface Streamablejava.io.IOExceptionpublic void readFrom(java.io.DataInputStream instream)
throws java.io.IOException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
StreamablereadFrom in interface Streamablejava.io.IOExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionCopyright ? 1998-2008 Bela Ban. All Rights Reserved.