public class ProcessControl extends Object
| Constructor and Description |
|---|
ProcessControl(SupportConfig runtime,
Process process) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addShutdownHook(Runnable runnable) |
static boolean |
executeCommandLine(SupportConfig support,
String label,
ProcessConfig processConfig) |
static ProcessControl |
fromCommandLine(SupportConfig 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(SupportConfig runtime,
ProcessBuilder processBuilder) |
int |
stop() |
int |
stop(long maxStopTimeoutMillis) |
int |
waitFor() |
int |
waitFor(long timeoutInMs) |
public ProcessControl(SupportConfig runtime, Process process)
public Reader getReader()
public InputStreamReader getError()
public int stop()
public int stop(long maxStopTimeoutMillis)
public static ProcessControl fromCommandLine(SupportConfig runtime, List<String> commandLine, boolean redirectErrorStream) throws IOException
IOExceptionpublic static ProcessControl start(SupportConfig 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(SupportConfig support, String label, ProcessConfig processConfig)
public int waitFor()
throws InterruptedException
InterruptedExceptionpublic int waitFor(long timeoutInMs)
throws InterruptedException
InterruptedExceptionpublic static void addShutdownHook(Runnable runnable)
public Long getPid()
Copyright © 2022. All rights reserved.