|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.stack.IpAddress
public class IpAddress
Network-dependent address (Internet). Generated by the bottommost layer of the protocol stack (UDP). Contains an InetAddress and port.
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
IpAddress()
|
|
IpAddress(java.net.InetAddress i,
int p)
|
|
IpAddress(java.net.InetSocketAddress sock_addr)
|
|
IpAddress(int port)
|
|
IpAddress(int port,
boolean set_default_host)
|
|
IpAddress(java.lang.String i,
int p)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
int |
compare(IpAddress other)
Deprecated. Use #compareTo(org.jgroups.Address) instead |
int |
compareTo(java.lang.Object o)
implements the java.lang.Comparable interface |
int |
compareToUnique(java.lang.Object o)
Deprecated. Use #compareTo(org.jgroups.Address) instead |
boolean |
equals(java.lang.Object obj)
|
byte[] |
getAdditionalData()
Returns the additional_data. |
java.net.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(java.io.ObjectInput in)
|
void |
readFrom(java.io.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 |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
void |
writeTo(java.io.DataOutputStream out)
Write the entire state of the current object (including superclasses) to outstream. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public IpAddress()
public IpAddress(java.lang.String i,
int p)
throws java.net.UnknownHostException
java.net.UnknownHostException
public IpAddress(java.net.InetAddress i,
int p)
public IpAddress(int port)
public IpAddress(int port,
boolean set_default_host)
public IpAddress(java.net.InetSocketAddress sock_addr)
| Method Detail |
|---|
public final java.net.InetAddress getIpAddress()
public final int getPort()
public final boolean isMulticastAddress()
Address
isMulticastAddress 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) instead
public final int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - - the Object to be compared
java.lang.ClassCastException - - if the specified object's type prevents it
from being compared to this Object.Comparablepublic final int compareToUnique(java.lang.Object o)
#compareTo(org.jgroups.Address) instead
compareTo(Object) if used excessively.
o -
public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
public void writeTo(java.io.DataOutputStream out)
throws java.io.IOException
Streamable
writeTo in interface Streamablejava.io.IOException
public void readFrom(java.io.DataInputStream in)
throws java.io.IOException
Streamable
readFrom in interface Streamablejava.io.IOExceptionpublic int size()
Address
size in interface Address
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||