com.dtolabs.rundeck.core.execution.utils
Interface Responder


public interface Responder

Responder defines a pattern of response to some input from a stream.

A Responder defines up to four different regular expressions:

It also defines some other heuristics:


Method Summary
 java.lang.String getInputFailurePattern()
          Return a regex to detect input prompt failure
 int getInputMaxLines()
          Return threshold max lines to read detecting input pattern
 long getInputMaxTimeout()
          Return threshold max timeout detecting input pattern
 java.lang.String getInputString()
          Return input string to send after successful input pattern (including any newline characters as necessary)
 java.lang.String getInputSuccessPattern()
          Return a regex to detect input prompt
 java.lang.String getResponseFailurePattern()
          Return a regex to detect response to input was failure
 int getResponseMaxLines()
          Return threshold max lines to read detecting response pattern
 long getResponseMaxTimeout()
          Return threshold max timeout detecting response pattern
 java.lang.String getResponseSuccessPattern()
          Return a regex to detect response to input was successful
 boolean isFailOnInputLinesThreshold()
          Return true if input max lines threshold indicates failure
 boolean isFailOnInputTimeoutThreshold()
          Return true if input max timeout threshold indicates failure
 boolean isFailOnResponseThreshold()
          Return true if response threshold indicates failure
 boolean isSuccessOnInputThreshold()
          Return true if input threshold indicates success
 

Method Detail

getInputSuccessPattern

java.lang.String getInputSuccessPattern()
Return a regex to detect input prompt


getInputFailurePattern

java.lang.String getInputFailurePattern()
Return a regex to detect input prompt failure


getInputMaxLines

int getInputMaxLines()
Return threshold max lines to read detecting input pattern


getInputMaxTimeout

long getInputMaxTimeout()
Return threshold max timeout detecting input pattern


isFailOnInputLinesThreshold

boolean isFailOnInputLinesThreshold()
Return true if input max lines threshold indicates failure


isFailOnInputTimeoutThreshold

boolean isFailOnInputTimeoutThreshold()
Return true if input max timeout threshold indicates failure


getResponseSuccessPattern

java.lang.String getResponseSuccessPattern()
Return a regex to detect response to input was successful


getResponseFailurePattern

java.lang.String getResponseFailurePattern()
Return a regex to detect response to input was failure


getResponseMaxLines

int getResponseMaxLines()
Return threshold max lines to read detecting response pattern


getResponseMaxTimeout

long getResponseMaxTimeout()
Return threshold max timeout detecting response pattern


isFailOnResponseThreshold

boolean isFailOnResponseThreshold()
Return true if response threshold indicates failure


getInputString

java.lang.String getInputString()
Return input string to send after successful input pattern (including any newline characters as necessary)


isSuccessOnInputThreshold

boolean isSuccessOnInputThreshold()
Return true if input threshold indicates success