|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xebialabs.deployit.hostsession.CapturingCommandExecutionCallbackHandler
public final class CapturingCommandExecutionCallbackHandler
An implementation of the CommandExecutionCallbackHandler that captures the output in variables.
| Constructor Summary | |
|---|---|
CapturingCommandExecutionCallbackHandler()
Creates a CommandExecutionCallbackHandler. |
|
CapturingCommandExecutionCallbackHandler(boolean debug)
Creates a CommandExecutionCallbackHandler that can be configured to debug the output. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAll()
Returns the captured regular and error output, with the lines separated by "\n". |
java.util.List<java.lang.String> |
getAllLines()
Returns the captured regular and error output lines. |
java.lang.String |
getError()
Returns the captured error output, with the lines separated by "\n". |
java.util.List<java.lang.String> |
getErrorLines()
Returns the captured error output lines. |
java.lang.String |
getOutput()
Returns the captured regular output, with the lines separated by "\n". |
java.util.List<java.lang.String> |
getOutputLines()
Returns the captured regular output lines. |
void |
handleErrorLine(java.lang.String line)
Invoked when an executed command generated a line of error (stderr). |
void |
handleOutput(char c)
Invoked when an executed command generates a character of output (stdout). |
void |
handleOutputLine(java.lang.String line)
Invoked when an executed command generated a line of output (stdout). |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CapturingCommandExecutionCallbackHandler()
public CapturingCommandExecutionCallbackHandler(boolean debug)
debug - if true, output is printed to System.out and System.err in addition to
being captured.| Method Detail |
|---|
public void handleOutputLine(java.lang.String line)
CommandExecutionCallbackHandler
handleOutputLine in interface CommandExecutionCallbackHandlerline - the line of output generated.public void handleErrorLine(java.lang.String line)
CommandExecutionCallbackHandler
handleErrorLine in interface CommandExecutionCallbackHandlerline - the line of output generated.public void handleOutput(char c)
CommandExecutionCallbackHandler
handleOutput in interface CommandExecutionCallbackHandlerc - the character of output generated.public java.util.List<java.lang.String> getOutputLines()
public java.lang.String getOutput()
public java.util.List<java.lang.String> getErrorLines()
public java.lang.String getError()
public java.util.List<java.lang.String> getAllLines()
public java.lang.String getAll()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||