public class PureJavaProcessManager extends Object implements ProcessManager
PID_NOT_FOUND, PID_UNKNOWN| Constructor and Description |
|---|
PureJavaProcessManager() |
| Modifier and Type | Method and Description |
|---|---|
long |
findPid(ProcessQuery query)
Finds a PID of a running process that has the specified command line.
|
static PureJavaProcessManager |
getDefault()
Gets the default instance of
PureJavaProcessManager. |
void |
kill(Process process,
long pid)
Kills the specified process.
|
public static PureJavaProcessManager getDefault()
PureJavaProcessManager.PureJavaProcessManager instance.public long findPid(ProcessQuery query)
ProcessManagerfindPid in interface ProcessManagerquery - A query used to find the process with the pid we are looking for.ProcessManager.PID_NOT_FOUND if not, or ProcessManager.PID_UNKNOWN if this
implementation is unable to find outpublic void kill(Process process, long pid)
ProcessManagerkill in interface ProcessManagerprocess - The process to kill.pid - The id of the process to kill.