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 Address
true
if the address is multicast address.public int size()
Address
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
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
.equals
in class java.lang.Object
true
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.Object
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());
toString
in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void writeTo(java.io.DataOutputStream outstream) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException
public void readFrom(java.io.DataInputStream instream) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException
Streamable
readFrom
in interface Streamable
java.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationException
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.