public abstract class ProcessTaskWrapper<RET> extends ProcessTaskStub implements TaskWrapper<RET>
getStdout()
will return partially completed streams while the task is ongoing
(and exit code will be null). You can block()
or get()
as conveniences on the underlying getTask()
.ProcessTaskStub.ScriptReturnType
Modifier and Type | Method and Description |
---|---|
Task<RET> |
asTask() |
ProcessTaskWrapper<RET> |
block()
blocks until the task completes; does not throw
|
RET |
get()
blocks and gets the result, throwing if there was an exception
|
java.lang.Integer |
getExitCode() |
java.lang.String |
getStderr() |
byte[] |
getStderrBytes() |
java.lang.String |
getStdout() |
byte[] |
getStdoutBytes() |
Task<RET> |
getTask() |
boolean |
isDone()
true iff the process has completed (with or without failure)
|
java.lang.String |
toString() |
getCommands, getCompletionListeners, getMachine, getShellEnvironment, getSummary
public Task<RET> asTask()
asTask
in interface TaskAdaptable<RET>
public Task<RET> getTask()
getTask
in interface TaskWrapper<RET>
public java.lang.Integer getExitCode()
public byte[] getStdoutBytes()
public byte[] getStderrBytes()
public java.lang.String getStdout()
public java.lang.String getStderr()
public java.lang.String toString()
toString
in class ProcessTaskStub
public RET get()
public ProcessTaskWrapper<RET> block()
public boolean isDone()