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
ProcessManager
isProcessRunning
in interface ProcessManager
InterruptedException
IOException
public void killProcess(String processName) throws InterruptedException, IOException
ProcessManager
killProcess
in interface ProcessManager
InterruptedException
IOException