Top Description Fields Constructors Methods
io.smallrye.common.os

public final Class Process

extends Object
Class Inheritance
Annotations
@SuppressWarnings:removal
Imports
java.security.AccessController, .PrivilegedAction, java.util.List

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

Field Summary

Modifier and TypeField and Description
private static final ProcessHandle
private static final ProcessHandle.Info
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static String
public static List<ProcessInfo>

Returns:

a list of all the running processes. May throw an exception if running on an unsupported JDK
getAllProcesses
()
Deprecated for removal since 2.4. Use ProcessHandle#allProcesses() instead.

Returns all the running processes.

public static ProcessInfo

Returns:

the current process
getCurrentProcess
()
Deprecated for removal since 2.4. Use ProcessHandle#current() to get the current process information.

Returns information about the current process

public static long

Returns:

the ID of this process
getProcessId
()
Deprecated for removal since 2.4. Use ProcessHandle#pid() instead.

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

currentback to summary
private static final ProcessHandle current
currentInfoback to summary
private static final ProcessHandle.Info currentInfo
nameback to summary
private static final String name

Constructor Detail

Processback to summary
private Process()

Method Detail

computeProcessNameback to summary
private static String computeProcessName()
getAllProcessesback to summary
public static List<ProcessInfo> getAllProcesses()

Deprecated

for removal since 2.4.

Use ProcessHandle#allProcesses() instead.

Returns all the running processes.

Returns:List<ProcessInfo>

a list of all the running processes. May throw an exception if running on an unsupported JDK

Annotations
@Deprecated
since:2.4
forRemoval:true
Exceptions
UnsupportedOperationException:
if running on JDK 8
getCurrentProcessback to summary
public static ProcessInfo getCurrentProcess()

Deprecated

for removal since 2.4.

Use ProcessHandle#current() to get the current process information.

Returns information about the current process

Returns:ProcessInfo

the current process

Annotations
@Deprecated
since:2.4
forRemoval:true
getProcessIdback to summary
public static long getProcessId()

Deprecated

for removal since 2.4.

Use ProcessHandle#pid() instead.

Get the ID of this process. This is the operating system specific PID.

Returns:long

the ID of this process

Annotations
@Deprecated
since:2.4
forRemoval:true
getProcessNameback to summary
public static String getProcessName()

Get the name of this process. If the process name is not known, then "<unknown>" is returned. The process name may be overridden by setting the jboss.process.name property.

Returns:String

the process name (not null)