public final class RuntimeOsUtilities extends Object
RuntimeMXBean
instance. The dependency to this
class is explicitly hidden via reflection to support Android devices, where
the management package does not exist.Modifier and Type | Class and Description |
---|---|
static class |
RuntimeOsUtilities.RuntimeNotAvailableException
Indicates that a
RuntimeMXBean instance is
not available on this system. |
Constructor and Description |
---|
RuntimeOsUtilities()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
determineArguments()
Returns the input arguments passed to the Java virtual machine which does
not include the arguments to the main method.
|
String |
determineHostName()
Returns the host name of the computer the JVM designated by the
RuntimeMXBean lives on. |
Integer |
determinePid()
Returns the PID of the java process.
|
Long |
determineStartTime()
Returns the start time of the process in milliseconds.
|
public List<String> determineArguments()
null
if no determinable on
current systempublic Long determineStartTime()
null
if no
determinable on current systempublic Integer determinePid()
null
if no determinable on
current systempublic String determineHostName()
RuntimeMXBean
lives on.null
if no determinable on current systemIllegalArgumentException
- in case the host name could not be parsed from the runtime
environmentCopyright © 2018 CoR-Lab. All rights reserved.