public class ProcessControl extends Object
| 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() |
Long |
getPid() |
Reader |
getReader() |
static ProcessBuilder |
newProcessBuilder(List<String> commandLine,
boolean redirectErrorStream) |
static ProcessBuilder |
newProcessBuilder(List<String> commandLine,
Map<String,String> environment,
boolean redirectErrorStream) |
static ProcessControl |
start(ISupportConfig runtime,
ProcessBuilder processBuilder) |
int |
stop() |
int |
waitFor() |
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 ProcessBuilder newProcessBuilder(List<String> commandLine, Map<String,String> environment, boolean redirectErrorStream)
public static boolean executeCommandLine(ISupportConfig support, String label, ProcessConfig processConfig)
public int waitFor()
throws InterruptedException
InterruptedExceptionpublic static void addShutdownHook(Runnable runable)
public Long getPid()
Copyright © 2016. All Rights Reserved.