public interface ProcessManager
| Modifier and Type | Field and Description |
|---|---|
static long |
PID_NOT_FOUND |
static long |
PID_UNKNOWN |
| Modifier and Type | Method and Description |
|---|---|
default boolean |
canFindPid()
Indicates whether the pid of the process can be found using a command line.
|
default long |
findPid(@NonNull ProcessQuery query)
Finds a PID of a running process that has the specified command line.
|
default void |
kill(@Nullable Process process,
long pid)
Kills the specified process.
|
static final long PID_NOT_FOUND
static final long PID_UNKNOWN
default boolean canFindPid()
true if the pid can be found using a command line, false otherwise.default long findPid(@NonNull 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.default void kill(@Nullable 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.Copyright © 2022 - present; JODConverter. All rights reserved.