|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object PIRL.Utilities.Host
public class Host
The Host class provides information about the host on which the process is running.
Field Summary | |
---|---|
static String |
DEFAULT_HOSTNAME
The name that will be provided for the hostname or IP address if they can not be obtained from the host system. |
static String |
FULL_HOSTNAME
The cannonical, fully qualified name of the host system. |
static String |
ID
|
static String |
IP_ADDRESS
The Internet Protocol address of the host system. |
static String |
SHORT_HOSTNAME
The short, single word name of the host system. |
Method Summary | |
---|---|
static Properties |
Environment()
Get all the environment variables from the host. |
static String |
Full_Hostname()
Get the fully qualified name of the host system. |
static String |
Full_Hostname(String hostname)
Get the fully qualified name for a hostname. |
static String |
Hostname()
Get the name of the host system. |
static String |
Hostname(String address)
Get the name of a host system. |
static String |
IP_Address()
Get the IP address of the host system. |
static String |
IP_Address(String hostname)
Get the IP address for a hostname. |
static String |
OS_Name()
Get the name of the host operating system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ID
public static final String FULL_HOSTNAME
If the hostname can not be obtained from the host system
the DEFAULT_HOSTNAME
will be used.
SHORT_HOSTNAME
public static final String SHORT_HOSTNAME
If the hostname can not be obtained from the host system
the DEFAULT_HOSTNAME
will be used.
FULL_HOSTNAME
public static final String IP_ADDRESS
If the IP address can not be obtained from the host system
the DEFAULT_HOSTNAME
will be used.
public static final String DEFAULT_HOSTNAME
Method Detail |
---|
public static String Hostname()
DEFAULT_HOSTNAME
is returned.SHORT_HOSTNAME
public static String Hostname(String address)
address
- The textual representation of a host system IP
address or its hostname. If null, the local host system is
assumed.
local system
, the DEFAULT_HOSTNAME
will not
be returned if hostname lookup fails; instead of an ambiguous
name for possibly multiple unknown hostnames, the calling
application is expected to have rules to deal with an unknown
hostname in this case.
SecurityException
- If hostname lookup is not allowed.public static String Full_Hostname()
DEFAULT_HOSTNAME
is returned.FULL_HOSTNAME
public static String Full_Hostname(String hostname)
hostname
- The name host system or the textual
representation of its IP address. If null, the local host system
is assumed.
local system
, the DEFAULT_HOSTNAME
will not be returned if hostname lookup fails;
instead of an ambiguous name for possibly multiple unknown
hostnames, the calling application is expected to have rules to
deal with an unknown hostname in this case.
SecurityException
- If hostname lookup is not allowed.public static String IP_Address()
DEFAULT_HOSTNAME
is returned.IP_ADDRESS
public static String IP_Address(String hostname)
hostname
- The name host system or the textual
representation of its IP address. If null, the local host system
is assumed.
local
system
, the DEFAULT_HOSTNAME
will not be returned if
hostname lookup fails; instead of an ambiguous name for possibly
multiple unknown hostnames, the calling application is expected
to have rules to deal with an unknown hostname in this case.
SecurityException
- If hostname lookup is not allowed.public static String OS_Name()
public static Properties Environment()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |