|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.javagroups.stack.IpAddress
Network-dependent address (Internet). Generated by the bottommost layer of the protocol stack (UDP). Contains an InetAddress and port.
Field Summary | |
---|---|
protected static java.util.HashMap |
sAddrCache
|
Constructor Summary | |
---|---|
IpAddress()
|
|
IpAddress(java.net.InetAddress i,
int p)
|
|
IpAddress(int port)
|
|
IpAddress(java.lang.String i,
int p)
|
Method Summary | |
---|---|
int |
compare(IpAddress other)
Establishes an order between 2 addresses. |
int |
compareTo(java.lang.Object o)
implements the java.lang.Comparable interface |
boolean |
equals(java.lang.Object obj)
|
byte[] |
getAdditionalData()
Returns the additional_data. |
java.net.InetAddress |
getIpAddress()
|
protected static java.net.InetAddress |
getIpAddress(byte[] addr)
|
int |
getPort()
|
int |
hashCode()
|
boolean |
isMulticastAddress()
Checks whether this is an address that represents multiple destinations, e.g. |
void |
readExternal(java.io.ObjectInput in)
|
void |
setAdditionalData(byte[] additional_data)
Sets the additional_data. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static java.util.HashMap sAddrCache
Constructor Detail |
public IpAddress()
public IpAddress(java.lang.String i, int p)
public IpAddress(java.net.InetAddress i, int p)
public IpAddress(int port)
Method Detail |
public java.net.InetAddress getIpAddress()
public int getPort()
public boolean isMulticastAddress()
Address
isMulticastAddress
in interface Address
public byte[] getAdditionalData()
public void setAdditionalData(byte[] additional_data)
additional_data
- The additional_data to setpublic int compare(IpAddress other)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- - the Object to be compared
java.lang.ClassCastException
- - if the specified object's type prevents it
from being compared to this Object.Comparable
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public 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.Externalizable
java.io.IOException
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
protected static java.net.InetAddress getIpAddress(byte[] addr)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |