public interface ProcessManager
| Modifier and Type | Field and Description |
|---|---|
static long |
PID_NOT_FOUND |
static long |
PID_UNKNOWN |
| Modifier and Type | Method and Description |
|---|---|
long |
findPid(ProcessQuery query)
Finds a PID of a running process that has the specified command line.
|
void |
kill(Process process,
long pid)
Kills the specified process.
|
static final long PID_NOT_FOUND
static final long PID_UNKNOWN
long findPid(ProcessQuery query) throws IOException
query - A query used to find the process with the pid we are looking for.PID_NOT_FOUND if not, or PID_UNKNOWN if this
implementation is unable to find outIOException - If an IO error occurs.void kill(Process process, long pid) throws IOException
process - The process to kill.pid - The id of the process to kill.IOException - If an IO error occurs.