de.flapdoodle.embed.process.runtime
Class ProcessControl
java.lang.Object
de.flapdoodle.embed.process.runtime.ProcessControl
public class ProcessControl
- extends Object
|
Method Summary |
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()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SLEEPT_TIMEOUT
public static final int SLEEPT_TIMEOUT
- See Also:
- Constant Field Values
ProcessControl
public ProcessControl(ISupportConfig runtime,
Process process)
getReader
public Reader getReader()
getError
public InputStreamReader getError()
stop
public int stop()
fromCommandLine
public static ProcessControl fromCommandLine(ISupportConfig runtime,
List<String> commandLine,
boolean redirectErrorStream)
throws IOException
- Throws:
IOException
start
public static ProcessControl start(ISupportConfig runtime,
ProcessBuilder processBuilder)
throws IOException
- Throws:
IOException
newProcessBuilder
public static ProcessBuilder newProcessBuilder(List<String> commandLine,
boolean redirectErrorStream)
executeCommandLine
public static boolean executeCommandLine(ISupportConfig support,
String label,
ProcessConfig processConfig)
killProcess
public static boolean killProcess(ISupportConfig support,
Platform platform,
IStreamProcessor output,
int pid)
tryKillProcess
public static boolean tryKillProcess(ISupportConfig support,
Platform platform,
IStreamProcessor output,
int pid)
waitFor
public int waitFor()
throws InterruptedException
- Throws:
InterruptedException
addShutdownHook
public static void addShutdownHook(Runnable runable)
Copyright © 2012. All Rights Reserved.