com.xebialabs.deployit.hostsession.common
Class InputResponseHandler

java.lang.Object
  extended by com.xebialabs.deployit.hostsession.common.InputResponseHandler
All Implemented Interfaces:
CommandExecutionCallbackHandler

public class InputResponseHandler
extends java.lang.Object
implements CommandExecutionCallbackHandler

Checks the output of an executed command and gives canned responses to expected output.


Constructor Summary
InputResponseHandler(CommandExecutionCallbackHandler decoatedHandler, java.io.OutputStream remoteStdin, java.util.Map<java.lang.String,java.lang.String> inputResponse)
           
 
Method Summary
 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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputResponseHandler

public InputResponseHandler(CommandExecutionCallbackHandler decoatedHandler,
                            java.io.OutputStream remoteStdin,
                            java.util.Map<java.lang.String,java.lang.String> inputResponse)
Method Detail

handleOutput

public void handleOutput(char c)
Description copied from interface: CommandExecutionCallbackHandler
Invoked when an executed command generates a character of output (stdout).

Specified by:
handleOutput in interface CommandExecutionCallbackHandler
Parameters:
c - the character of output generated.

handleOutputLine

public void handleOutputLine(java.lang.String line)
Description copied from interface: CommandExecutionCallbackHandler
Invoked when an executed command generated a line of output (stdout).

Specified by:
handleOutputLine in interface CommandExecutionCallbackHandler
Parameters:
line - the line of output generated.

handleErrorLine

public void handleErrorLine(java.lang.String line)
Description copied from interface: CommandExecutionCallbackHandler
Invoked when an executed command generated a line of error (stderr).

Specified by:
handleErrorLine in interface CommandExecutionCallbackHandler
Parameters:
line - the line of output generated.


Copyright © 2010. All Rights Reserved.