public static class RunCommand.Status
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.util.List<java.lang.String> |
command
The command executed.
|
java.util.List<java.lang.String> |
errorOutputLines
The error output from running the command.
|
int |
exitStatus
The exit status of the command.
|
java.util.List<java.lang.String> |
standardOutputLines
The output from running the command.
|
boolean |
timedOut
Whether the command process timed out.
|
| Constructor and Description |
|---|
Status(java.util.List<java.lang.String> command,
int exitStatus,
boolean timedOut,
java.util.List<java.lang.String> standardOutputLines,
java.util.List<java.lang.String> errorOutputLines)
Creates a
RunCommand.Status object for the command with captured exit status and output. |
| Modifier and Type | Method and Description |
|---|---|
private void |
describeLines(java.lang.String source,
java.util.List<java.lang.String> lines,
java.lang.StringBuilder sb)
Print to sb the lines, or say how many lines there were.
|
java.lang.String |
toString() |
public final java.util.List<java.lang.String> command
public final int exitStatus
public final boolean timedOut
public final java.util.List<java.lang.String> standardOutputLines
public final java.util.List<java.lang.String> errorOutputLines
Status(java.util.List<java.lang.String> command,
int exitStatus,
boolean timedOut,
java.util.List<java.lang.String> standardOutputLines,
java.util.List<java.lang.String> errorOutputLines)
RunCommand.Status object for the command with captured exit status and output.
The output from command execution is captured as a List of output lines. This
avoids losing output from the command if the process is destroyed.
command - the commandexitStatus - the exit statustimedOut - whether the process timed outstandardOutputLines - the lines of process output to standard outputerrorOutputLines - the lines of process output to standard errorpublic java.lang.String toString()
toString in class java.lang.Objectprivate void describeLines(java.lang.String source,
java.util.List<java.lang.String> lines,
java.lang.StringBuilder sb)
source - the source of the lines, such as "stdout" or "stderr"lines - the linessb - where to print the represenation