public class ProcessControl extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SLEEPT_TIMEOUT |
| Constructor and Description |
|---|
ProcessControl(ISupportConfig runtime,
Process process) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addShutdownHook(Runnable runable) |
static boolean |
executeCommandLine(ISupportConfig support,
String label,
ProcessConfig processConfig) |
static ProcessControl |
fromCommandLine(ISupportConfig runtime,
List<String> commandLine,
boolean redirectErrorStream) |
InputStreamReader |
getError() |
Reader |
getReader() |
static boolean |
killProcess(ISupportConfig support,
Platform platform,
IStreamProcessor output,
int pid) |
static ProcessBuilder |
newProcessBuilder(List<String> commandLine,
boolean redirectErrorStream) |
static ProcessControl |
start(ISupportConfig runtime,
ProcessBuilder processBuilder) |
int |
stop() |
static boolean |
tryKillProcess(ISupportConfig support,
Platform platform,
IStreamProcessor output,
int pid) |
int |
waitFor() |
public static final int SLEEPT_TIMEOUT
public ProcessControl(ISupportConfig runtime, Process process)
public Reader getReader()
public InputStreamReader getError()
public int stop()
public static ProcessControl fromCommandLine(ISupportConfig runtime, List<String> commandLine, boolean redirectErrorStream) throws IOException
IOExceptionpublic static ProcessControl start(ISupportConfig runtime, ProcessBuilder processBuilder) throws IOException
IOExceptionpublic static ProcessBuilder newProcessBuilder(List<String> commandLine, boolean redirectErrorStream)
public static boolean executeCommandLine(ISupportConfig support, String label, ProcessConfig processConfig)
public static boolean killProcess(ISupportConfig support, Platform platform, IStreamProcessor output, int pid)
public static boolean tryKillProcess(ISupportConfig support, Platform platform, IStreamProcessor output, int pid)
public int waitFor()
throws InterruptedException
InterruptedExceptionpublic static void addShutdownHook(Runnable runable)
Copyright © 2013. All Rights Reserved.