public class Processes extends Object
SystemProcess instances.| Constructor and Description |
|---|
Processes() |
| Modifier and Type | Method and Description |
|---|---|
static JavaProcess |
newJavaProcess(Process process)
Creates an instance that represents the given
Process object. |
static PidProcess |
newPidProcess(int pid)
Creates an instance that represents the given PID value.
|
static PidProcess |
newPidProcess(Process process)
Creates an instance that represents the PID value of the given
Process. |
static SystemProcess |
newProcessForMultiple(SystemProcess... processes)
Combines existing
SystemProcess objects for multiple processes. |
static SystemProcess |
newProcessWithAlternatives(SystemProcess... processes)
Combines existing
SystemProcess objects as alternative implementations for a single process. |
static SystemProcess |
newProcessWithAtlernatives(SystemProcess... processes)
Deprecated.
Use
newProcessWithAlternatives(SystemProcess...) instead. |
static SystemProcess |
newStandardProcess(Process process)
|
static SystemProcess |
newStandardProcess(Process process,
int pid)
Creates an instance that represents the given
Process or the given PID. |
public static SystemProcess newStandardProcess(Process process)
Process by detecting its PID
using both, Process object and external tools.
Java APIs are tried before using the external tools.process - instance of an existing process started from JVM.public static SystemProcess newStandardProcess(Process process, int pid)
Process or the given PID.
They are expected to belong to the same system process.
Java APIs are tried before using the external tools (PID value).process - instance of an existing process started from JVM.pid - PID of the same process.public static JavaProcess newJavaProcess(Process process)
Process object.process - instance of an existing process started from JVM.public static PidProcess newPidProcess(Process process)
Process.
The instance uses external tools for killing the process.process - instance of an existing process started from JVM.public static PidProcess newPidProcess(int pid)
pid - PID of an external process (running or not).public static SystemProcess newProcessWithAtlernatives(SystemProcess... processes)
newProcessWithAlternatives(SystemProcess...) instead.SystemProcess objects as alternative implementations for a single process.processes - alternative process instances that represent a single process.public static SystemProcess newProcessWithAlternatives(SystemProcess... processes)
SystemProcess objects as alternative implementations for a single process.processes - alternative process instances that represent a single process.public static SystemProcess newProcessForMultiple(SystemProcess... processes)
SystemProcess objects for multiple processes.processes - process instances that represent different processes.Copyright © 2019 ZeroTurnaround. All rights reserved.