public class ProcessOutput
extends java.lang.Object
Constructor and Description |
---|
ProcessOutput() |
ProcessOutput(int exitCode) |
Modifier and Type | Method and Description |
---|---|
void |
appendStderr(java.lang.String text) |
void |
appendStdout(java.lang.String text) |
boolean |
checkSuccess(Logger logger)
If exit code is nonzero or the process timed out, logs exit code and process output (if any) and returns
false ,
otherwise just returns true . |
int |
getExitCode() |
java.lang.String |
getStderr() |
java.util.List<java.lang.String> |
getStderrLines() |
java.util.List<java.lang.String> |
getStderrLines(boolean excludeEmptyLines) |
java.lang.String |
getStdout() |
java.util.List<java.lang.String> |
getStdoutLines() |
java.util.List<java.lang.String> |
getStdoutLines(boolean excludeEmptyLines) |
boolean |
isCancelled() |
boolean |
isExitCodeSet()
Returns
false if exit code wasn't set (e.g. |
boolean |
isTimeout() |
void |
setCancelled() |
void |
setExitCode(int exitCode) |
void |
setTimeout() |
public ProcessOutput()
public ProcessOutput(int exitCode)
public void appendStdout(java.lang.String text)
public void appendStderr(java.lang.String text)
public java.lang.String getStdout()
public java.lang.String getStderr()
public java.util.List<java.lang.String> getStdoutLines()
public java.util.List<java.lang.String> getStdoutLines(boolean excludeEmptyLines)
public java.util.List<java.lang.String> getStderrLines()
public java.util.List<java.lang.String> getStderrLines(boolean excludeEmptyLines)
public boolean checkSuccess(Logger logger)
false
,
otherwise just returns true
.public void setExitCode(int exitCode)
public int getExitCode()
public boolean isExitCodeSet()
false
if exit code wasn't set (e.g. when CapturingProcessHandler.runProcess()
execution was interrupted).public void setTimeout()
public boolean isTimeout()
public void setCancelled()
public boolean isCancelled()