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(java.lang.Process process,
long pid)
Kills the specified process.
|
static final long PID_NOT_FOUND
static final long PID_UNKNOWN
long findPid(ProcessQuery query) throws java.io.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 outjava.io.IOException
- If an IO error occurs.void kill(java.lang.Process process, long pid) throws java.io.IOException
process
- The process to kill.pid
- The id of the process to kill.java.io.IOException
- If an IO error occurs.