public class PureJavaProcessManager extends java.lang.Object implements ProcessManager
PID_NOT_FOUND, PID_UNKNOWN| 构造器和说明 |
|---|
PureJavaProcessManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
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(java.lang.Process process,
long pid)
Kills the specified process.
|
public static PureJavaProcessManager getDefault()
PureJavaProcessManager.PureJavaProcessManager instance.public long findPid(ProcessQuery query)
ProcessManagerfindPid 在接口中 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(java.lang.Process process,
long pid)
ProcessManagerkill 在接口中 ProcessManagerprocess - The process to kill.pid - The id of the process to kill.