Class MessageValidator
java.lang.Object
org.springframework.integration.test.support.AbstractResponseValidator<org.springframework.messaging.Message<?>>
org.springframework.integration.test.support.MessageValidator
- All Implemented Interfaces:
org.springframework.messaging.MessageHandler
public abstract class MessageValidator
extends AbstractResponseValidator<org.springframework.messaging.Message<?>>
Validate a message. Create an anonymous instance or subclass to
implement the validateMessage() method
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final boolean
If true will extract the payload as the parameter for validateResponse()protected abstract void
validateMessage
(org.springframework.messaging.Message<?> message) Implement this method to validate the messageprotected final void
validateResponse
(org.springframework.messaging.Message<?> response) Implement this method to validate the response (Message or Payload)Methods inherited from class org.springframework.integration.test.support.AbstractResponseValidator
getLastMessage, handleMessage
-
Constructor Details
-
MessageValidator
public MessageValidator()
-
-
Method Details
-
extractPayload
protected final boolean extractPayload()Description copied from class:AbstractResponseValidator
If true will extract the payload as the parameter for validateResponse()- Specified by:
extractPayload
in classAbstractResponseValidator<org.springframework.messaging.Message<?>>
- Returns:
- true to extract the payload; false to process the message.
-
validateResponse
protected final void validateResponse(org.springframework.messaging.Message<?> response) Description copied from class:AbstractResponseValidator
Implement this method to validate the response (Message or Payload)- Specified by:
validateResponse
in classAbstractResponseValidator<org.springframework.messaging.Message<?>>
- Parameters:
response
- The response.
-
validateMessage
protected abstract void validateMessage(org.springframework.messaging.Message<?> message) Implement this method to validate the message- Parameters:
message
- The message.
-