Top Description Fields Constructors Methods
org.wildfly.common.os

public final Class Process

extends Object
Class Inheritance
Static Imports
java.security.AccessController.doPrivileged

Utilities for getting information about the current process.
Author
David M. Lloyd

Field Summary

Modifier and TypeField and Description
private static final long
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static long

Returns:

the ID of this process, or -1 if it cannot be determined
getProcessId
()

Get the ID of this process.

public static String

Returns:

the process name (not null)
getProcessName
()

Get the name of this process.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

processIdback to summary
private static final long processId
processNameback to summary
private static final String processName

Constructor Detail

Processback to summary
private Process()

Method Detail

getProcessIdback to summary
public static long getProcessId()

Get the ID of this process. This is the operating system specific PID. If the PID cannot be determined, -1 is returned.

Returns:long

the ID of this process, or -1 if it cannot be determined

getProcessNameback to summary
public static String getProcessName()

Get the name of this process. If the process name is not known, then "<unknown>" is returned.

Returns:String

the process name (not null)