|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jgroup.util.Network
public class Network
Utility class for obtaining the local host.
Constructor Summary | |
---|---|
Network()
|
Method Summary | |
---|---|
static java.lang.String |
getLocalDomainName()
Returns the domain name of the local host; not including the machine name part. |
static java.net.InetAddress |
getLocalHost()
Returns the internet address of the local host. |
static java.lang.String |
getLocalHostName()
Returns the hostname of the local host; may include the fully qualified domain name. |
static java.lang.String |
getLocalMachineName()
Returns the machine name of the local host; not including the fully qualified domain name. |
static java.lang.String |
getMachineName(java.lang.String hostName)
Returns the machine name of the given host; not including the fully qualified domain name. |
static boolean |
isLocal(java.net.InetAddress address)
Returns true if the specified address is the local
host; false is returned otherwise. |
static boolean |
isLocal(int packedAddress)
Returns true if the specified packedAddress is the local
host; false is returned otherwise. |
static int |
translate(java.net.InetAddress address)
Returns an integer representation of the specified InetAddress . |
static java.net.InetAddress |
translate(int packed)
Returns an InetAddress representation of the
specified integer. |
static int |
translateToInt(java.lang.String address)
Returns an integer representation of the specified String IP-address. |
static java.lang.String |
translateToString(int packed)
Returns a String representation of the IP-address for
the specified integer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Network()
Method Detail |
---|
public static java.net.InetAddress getLocalHost()
public static java.lang.String getLocalHostName()
public static java.lang.String getLocalMachineName()
public static java.lang.String getMachineName(java.lang.String hostName)
public static java.lang.String getLocalDomainName()
public static boolean isLocal(java.net.InetAddress address)
address
is the local
host; false is returned otherwise.
public static boolean isLocal(int packedAddress)
packedAddress
is the local
host; false is returned otherwise.
public static int translate(java.net.InetAddress address)
InetAddress
. This is used for efficiency.
public static java.net.InetAddress translate(int packed) throws java.net.UnknownHostException
InetAddress
representation of the
specified integer. This is used for performance improvements in
serialization.
packed
- An integer representation of an internet address.
InetAddress
representation.
java.net.UnknownHostException
- If the specified integer does not correspond to a known host.public static int translateToInt(java.lang.String address) throws java.net.UnknownHostException
String
IP-address. This is used for efficiency.
java.net.UnknownHostException
public static java.lang.String translateToString(int packed)
String
representation of the IP-address for
the specified integer.
packed
- An integer representation of an internet address.
InetAddress
representation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |