Class RequestResponseScenario

java.lang.Object
org.springframework.integration.test.support.RequestResponseScenario

public class RequestResponseScenario extends Object
Defines a Spring Integration request response test scenario. All setter methods may be chained.
Author:
David Turanski
  • Constructor Details

    • RequestResponseScenario

      public RequestResponseScenario(String inputChannelName, String outputChannelName)
      Create an instance
      Parameters:
      inputChannelName - the input channel name
      outputChannelName - the output channel name
  • Method Details

    • getMessage

      protected Message<? extends Object> getMessage()
    • getInputChannelName

      public String getInputChannelName()
      Returns:
      the input channel name
    • getOutputChannelName

      public String getOutputChannelName()
      Returns:
      the output channel name
    • getPayload

      public Object getPayload()
      Returns:
      the request message payload
    • setPayload

      public RequestResponseScenario setPayload(Object payload)
      set the payload of the request message
      Parameters:
      payload - The payload.
      Returns:
      this
    • getName

      public String getName()
      Returns:
      the scenario name
    • setName

      public RequestResponseScenario setName(String name)
      Set the scenario name (optional)
      Parameters:
      name - the name
      Returns:
      this
    • getResponseValidator

      public AbstractResponseValidator<?> getResponseValidator()
      Returns:
      the response validator
      See Also:
    • setResponseValidator

      public RequestResponseScenario setResponseValidator(AbstractResponseValidator<?> responseValidator)
      Set the response validator
      Parameters:
      responseValidator - The response validator.
      Returns:
      this
      See Also:
    • setMessage

      public RequestResponseScenario setMessage(Message<?> message)
      Set the request message (as an alternative to setPayload())
      Parameters:
      message - The message.
      Returns:
      this
    • init

      protected void init()