public class PkillProcessManager extends Object implements ProcessManager
Only supported on non-Windows platforms (depends on pkill binary).
| Constructor and Description |
|---|
PkillProcessManager(ProcessExecutor processExecutor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isProcessRunning(String processName)
Returns true if the named process is running, false otherwise.
|
void |
killProcess(String processName)
Kills the process if it's running.
|
public PkillProcessManager(ProcessExecutor processExecutor)
public boolean isProcessRunning(String processName) throws InterruptedException, IOException
ProcessManagerisProcessRunning in interface ProcessManagerInterruptedExceptionIOExceptionpublic void killProcess(String processName) throws InterruptedException, IOException
ProcessManagerkillProcess in interface ProcessManagerInterruptedExceptionIOException