org.jgroups.protocols
Class JMS.JMSAddress
java.lang.Object
org.jgroups.protocols.JMS.JMSAddress
- JMS
- Address, Cloneable, Comparable, Externalizable, Streamable
protected static class JMS.JMSAddress
extends java.lang.Object
Simple
Address
representing the JMS node ID or JMS topic group.
protected Object | clone() - Clone the object.
|
int | compareTo(Object o) - Compare this object to
o .
|
boolean | equals(Object obj) - Test is this object is equal to
obj .
|
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(ObjectInput in) - Read object from external input.
|
void | readFrom(DataInputStream instream) - Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
void | setAddress(String address) - Set the node address.
|
int | size()
|
String | toString() - Get the string representation of the address.
|
void | writeExternal(ObjectOutput out) - Write the object to external output.
|
void | writeTo(DataOutputStream outstream) - Write the entire state of the current object (including superclasses) to outstream.
|
clone
protected Object clone()
throws CloneNotSupportedException
Clone the object.
compareTo
public int compareTo(Object o)
throws ClassCastException
Compare this object to o
. It is possible to compare only
addresses of the same class. Also they both should be either
multicast or unicast addresses.
- value compliant with the
Comparable.compareTo(Object)
specififaction.
equals
public boolean equals(Object obj)
Test is this object is equal to obj
.
true
iff the obj
is
JMSAddress
, node addresses are equal and they both are
either multicast or unicast addresses.
getAddress
public String getAddress()
Get the node address.
- node address in the form passed to the constructor
JMS.JMSAddress(String, boolean)
.
hashCode
public int hashCode()
Get the hash code of this address.
- hash code of this object.
isMulticastAddress
public boolean isMulticastAddress()
Is the address a multicast address?
- isMulticastAddress in interface Address
true
if the address is multicast address.
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
Read object from external input.
readFrom
public void readFrom(DataInputStream instream)
throws IOException,
IllegalAccessException,
InstantiationException
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
- readFrom in interface Streamable
setAddress
public void setAddress(String address)
Set the node address.
address
- new node address.
toString
public String toString()
Get the string representation of the address. The following property
holds: a2.equals(a1)
is always true
, where
a2
is
JMSAddress a2 = new JMSAddress(a1.toString());
- string representation of the address.
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
Write the object to external output.
writeTo
public void writeTo(DataOutputStream outstream)
throws IOException
Write the entire state of the current object (including superclasses) to outstream.
Note that the output stream must not be closed
- writeTo in interface Streamable
Copyright B) 1998-2005 Bela Ban. All Rights Reserved.