public abstract class RuntimeUtils
extends java.lang.Object
Constructor and Description |
---|
RuntimeUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getHost()
Return the name of the host for the machine running this process.
|
static java.lang.String |
getIpAddress()
Return a non loopback IPv4 address for the machine running this process.
|
static int |
getPid()
Return the process id for this process.
|
public static java.lang.String getHost()
InetAddress.getLocalHost()
,
InetAddress.getHostName()
public static java.lang.String getIpAddress()
NetworkInterface.getNetworkInterfaces()
is returned.NetworkInterface.getNetworkInterfaces()
,
NetworkInterface.getInetAddresses()
public static int getPid()