Class AbstractResponseValidator<T>

java.lang.Object
org.springframework.integration.test.support.AbstractResponseValidator<T>
All Implemented Interfaces:
org.springframework.messaging.MessageHandler
Direct Known Subclasses:
MessageValidator, PayloadValidator

public abstract class AbstractResponseValidator<T>
extends java.lang.Object
implements org.springframework.messaging.MessageHandler
The base class for response validators used for RequestResponseScenarios
  • 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()
    org.springframework.messaging.Message<?> getLastMessage()  
    void handleMessage​(org.springframework.messaging.Message<?> message)
    handle the message
    protected abstract void validateResponse​(T response)
    Implement this method to validate the response (Message or Payload)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • handleMessage

      public void handleMessage​(org.springframework.messaging.Message<?> message) throws org.springframework.messaging.MessagingException
      handle the message
      Specified by:
      handleMessage in interface org.springframework.messaging.MessageHandler
      Throws:
      org.springframework.messaging.MessagingException
    • validateResponse

      protected abstract void validateResponse​(T response)
      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

      public org.springframework.messaging.Message<?> getLastMessage()
      Returns:
      the lastMessage