public class CollectingOutputReceiver extends java.lang.Object implements IShellOutputReceiver
IShellOutputReceiver which collects the whole shell output into one
String.| Constructor and Description |
|---|
CollectingOutputReceiver() |
CollectingOutputReceiver(java.util.concurrent.CountDownLatch commandCompleteLatch) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOutput(byte[] data,
int offset,
int length)
Called every time some new data is available.
|
void |
cancel()
Cancel the output collection
|
void |
flush()
Called at the end of the process execution (unless the process was
canceled).
|
java.lang.String |
getOutput() |
boolean |
isCancelled()
Cancel method to stop the execution of the remote shell command.
|
public CollectingOutputReceiver()
public CollectingOutputReceiver(java.util.concurrent.CountDownLatch commandCompleteLatch)
public java.lang.String getOutput()
public boolean isCancelled()
IShellOutputReceiverisCancelled in interface IShellOutputReceiverpublic void cancel()
public void addOutput(byte[] data,
int offset,
int length)
IShellOutputReceiveraddOutput in interface IShellOutputReceiverdata - The new data.offset - The offset at which the new data starts.length - The length of the new data.public void flush()
IShellOutputReceiverflush in interface IShellOutputReceiver