Class AbstractResponseValidator<T>
java.lang.Object
org.springframework.integration.test.support.AbstractResponseValidator<T>
- All Implemented Interfaces:
MessageHandler
- Direct Known Subclasses:
MessageValidator
,PayloadValidator
public abstract class AbstractResponseValidator<T> extends Object implements MessageHandler
The base class for response validators used for
RequestResponseScenario
s- Author:
- David Turanski
-
Constructor Summary
Constructors Constructor Description AbstractResponseValidator()
-
Method Summary
Modifier and Type Method Description protected abstract boolean
extractPayload()
If true will extract the payload as the parameter for validateResponse()Message<?>
getLastMessage()
void
handleMessage(Message<?> message)
handle the messageprotected abstract void
validateResponse(T response)
Implement this method to validate the response (Message or Payload)
-
Constructor Details
-
AbstractResponseValidator
public AbstractResponseValidator()
-
-
Method Details
-
handleMessage
handle the message- Specified by:
handleMessage
in interfaceMessageHandler
- Throws:
MessagingException
-
validateResponse
Implement this method to validate the response (Message or Payload)- Parameters:
response
- The response.
-
extractPayload
protected abstract boolean extractPayload()If true will extract the payload as the parameter for validateResponse()- Returns:
- true to extract the payload; false to process the message.
-
getLastMessage
- Returns:
- the lastMessage
-