
public class ProcessExecution extends Object
| Constructor and Description |
|---|
ProcessExecution(Process process,
String processId,
PrintStream stdout,
PrintStream stderr)
Creates a process execution, add an id to the process
|
| Modifier and Type | Method and Description |
|---|---|
ProcessExecution |
appendOutput(CharSequence line)
Adds a line to output of this process
|
boolean |
executionFailed()
Checks whether
getExitCode() was 0 |
int |
getExitCode()
Returns exit code
|
List<String> |
getOutput() |
Process |
getProcess() |
String |
getProcessId() |
PrintStream |
getStderr() |
PrintStream |
getStdout() |
boolean |
isFinished()
Checks whether process has finished
|
ProcessExecution |
replyWith(Answer reply)
Writes
reply into process input stream. |
public ProcessExecution(Process process, String processId, PrintStream stdout, PrintStream stderr)
process - processId - public Process getProcess()
public String getProcessId()
public ProcessExecution appendOutput(CharSequence line)
line - public ProcessExecution replyWith(Answer reply) throws IOException
reply into process input stream. Type of answer might result into closing the stream itselfreply - IOExceptionpublic boolean isFinished()
public int getExitCode()
throws IllegalStateException
IllegalStateException - thrown if process is not finishedpublic boolean executionFailed()
getExitCode() was 0public PrintStream getStderr()
public PrintStream getStdout()
Copyright © 2014 JBoss by Red Hat. All rights reserved.