org.jgroups.protocols

Class JMS.JMSAddress

protected static class JMS.JMSAddress extends Object implements Address

Simple Address representing the JMS node ID or JMS topic group.
Method Summary
protected Objectclone()
Clone the object.
intcompareTo(Object o)
Compare this object to o.
booleanequals(Object obj)
Test is this object is equal to obj.
StringgetAddress()
Get the node address.
inthashCode()
Get the hash code of this address.
booleanisMulticastAddress()
Is the address a multicast address?
voidreadExternal(ObjectInput in)
Read object from external input.
voidreadFrom(DataInputStream instream)
voidsetAddress(String address)
Set the node address.
intsize()
StringtoString()
Get the string representation of the address.
voidwriteExternal(ObjectOutput out)
Write the object to external output.
voidwriteTo(DataOutputStream outstream)

Method Detail

clone

protected Object clone()
Clone the object.

compareTo

public int compareTo(Object o)
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.

Returns: value compliant with the Comparable#compareTo(Object) specififaction.

equals

public boolean equals(Object obj)
Test is this object is equal to obj.

Returns: 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.

Returns: node address in the form passed to the constructor .JMSAddress(String, boolean).

hashCode

public int hashCode()
Get the hash code of this address.

Returns: hash code of this object.

isMulticastAddress

public boolean isMulticastAddress()
Is the address a multicast address?

Returns: true if the address is multicast address.

readExternal

public void readExternal(ObjectInput in)
Read object from external input.

readFrom

public void readFrom(DataInputStream instream)

setAddress

public void setAddress(String address)
Set the node address.

Parameters: address new node address.

size

public int size()

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());

Returns: string representation of the address.

writeExternal

public void writeExternal(ObjectOutput out)
Write the object to external output.

writeTo

public void writeTo(DataOutputStream outstream)
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.