org.sandev.basics.util
Class ConfirmationValidator
java.lang.Object
org.sandev.basics.util.ConfirmationValidator
- All Implemented Interfaces:
- MessageValidator
- public class ConfirmationValidator
- extends java.lang.Object
- implements MessageValidator
The ConfirmationValidator implements the MessageValidator interface by
simply confirming everything is what it looks like. So all possible
errors are confirmed as errors, and all reasonable input is confirmed
as reasonable input. Essentially it is a no-op validator. This is
useful as a default for simple tests that do not require any real
analysis of results beyond the match specification.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfirmationValidator
public ConfirmationValidator()
asynchError
public int asynchError(SandMessage msg,
MessageDriverNode driver)
- Description copied from interface:
MessageValidator
- The given message may be an error according to the match
specification. Confirm what the status is, using the reference
to the MessageDriver for logging and other purposes.
- Specified by:
asynchError in interface MessageValidator
asynchExpected
public int asynchExpected(SandMessage msg,
MessageDriverNode driver)
- Description copied from interface:
MessageValidator
- The given message may be correct input according to the match
specification. Confirm what the status is, using the reference
to the MessageDriver for logging and other purposes.
- Specified by:
asynchExpected in interface MessageValidator
queryResult
public int queryResult(SandMessage sent,
SandMessage received,
MessageDriverNode driver)
- Description copied from interface:
MessageValidator
- Confirm the status of this response to the given query. Use
the reference to the MessageDriver for logging and other purposes.
- Specified by:
queryResult in interface MessageValidator