Package io.smallrye.common.os
Class Process
java.lang.Object
io.smallrye.common.os.Process
Utilities for getting information about the current process.
- Author:
- David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<ProcessInfo>Deprecated, for removal: This API element is subject to removal in a future version.static ProcessInfoDeprecated, for removal: This API element is subject to removal in a future version.UseProcessHandle.current()to get the current process information.static longDeprecated, for removal: This API element is subject to removal in a future version.UseProcessHandle.pid()instead.static StringGet the name of this process.
-
Method Details
-
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 thejboss.process.nameproperty.- Returns:
- the process name (not
null)
-
getProcessId
Deprecated, for removal: This API element is subject to removal in a future version.UseProcessHandle.pid()instead.Get the ID of this process. This is the operating system specific PID.- Returns:
- the ID of this process
-
getCurrentProcess
Deprecated, for removal: This API element is subject to removal in a future version.UseProcessHandle.current()to get the current process information.Returns information about the current process- Returns:
- the current process
-
getAllProcesses
Deprecated, for removal: This API element is subject to removal in a future version.UseProcessHandle.allProcesses()instead.Returns all the running processes.- Returns:
- a list of all the running processes. May throw an exception if running on an unsupported JDK
- Throws:
UnsupportedOperationException- if running on JDK 8
-
ProcessHandle.allProcesses()instead.