public class IpAddress extends Object implements PhysicalAddress
| Constructor and Description |
|---|
IpAddress() |
IpAddress(InetAddress i,
int p) |
IpAddress(InetSocketAddress sock_addr) |
IpAddress(int port) |
IpAddress(int port,
boolean set_default_host) |
IpAddress(String i,
int p) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
int |
compare(IpAddress other)
Deprecated.
Use
compareTo(org.jgroups.Address) instead |
int |
compareTo(Address o)
implements the java.lang.Comparable interface
|
int |
compareToUnique(Object o)
Deprecated.
Use
compareTo(org.jgroups.Address) instead |
boolean |
equals(Object obj) |
byte[] |
getAdditionalData()
Returns the additional_data.
|
InetAddress |
getIpAddress() |
int |
getPort() |
int |
hashCode() |
boolean |
isMulticastAddress()
Checks whether this is an address that represents multiple destinations;
e.g., a class D address in the Internet.
|
void |
readExternal(ObjectInput in) |
void |
readFrom(DataInputStream in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
void |
setAdditionalData(byte[] additional_data)
Sets the additional_data.
|
int |
size()
Returns serialized size of this address
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
void |
writeTo(DataOutputStream out)
Write the entire state of the current object (including superclasses) to outstream.
|
protected static final Log log
public IpAddress()
public IpAddress(String i, int p) throws UnknownHostException
UnknownHostExceptionpublic IpAddress(InetAddress i, int p)
public IpAddress(int port)
public IpAddress(int port,
boolean set_default_host)
public IpAddress(InetSocketAddress sock_addr)
public final InetAddress getIpAddress()
public final int getPort()
public final boolean isMulticastAddress()
AddressisMulticastAddress in interface Addresspublic final byte[] getAdditionalData()
public final void setAdditionalData(byte[] additional_data)
additional_data - The additional_data to setpublic final int compare(IpAddress other)
compareTo(org.jgroups.Address) insteadpublic final int compareTo(Address o)
compareTo in interface Comparable<Address>o - - the Object to be comparedClassCastException - - if the specified object's type prevents it
from being compared to this Object.Comparablepublic final int compareToUnique(Object o)
compareTo(org.jgroups.Address) insteadComparable.compareTo(Object) if used excessively.o - public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeTo(DataOutputStream out) throws IOException
StreamablewriteTo in interface StreamableIOExceptionpublic void readFrom(DataInputStream in) throws IOException
StreamablereadFrom in interface StreamableIOExceptionpublic int size()
Addresspublic Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.