Class RequestResponseScenario
java.lang.Object
org.springframework.integration.test.support.RequestResponseScenario
public class RequestResponseScenario
extends java.lang.Object
Defines a Spring Integration request response test scenario. All setter methods may
be chained.
-
Constructor Summary
Constructors Constructor Description RequestResponseScenario(java.lang.String inputChannelName, java.lang.String outputChannelName)Create an instance -
Method Summary
Modifier and Type Method Description java.lang.StringgetInputChannelName()protected org.springframework.messaging.Message<? extends java.lang.Object>getMessage()java.lang.StringgetName()java.lang.StringgetOutputChannelName()java.lang.ObjectgetPayload()AbstractResponseValidator<?>getResponseValidator()protected voidinit()RequestResponseScenariosetMessage(org.springframework.messaging.Message<?> message)Set the request message (as an alternative to setPayload())RequestResponseScenariosetName(java.lang.String name)Set the scenario name (optional)RequestResponseScenariosetPayload(java.lang.Object payload)set the payload of the request messageRequestResponseScenariosetResponseValidator(AbstractResponseValidator<?> responseValidator)Set the response validator
-
Constructor Details
-
RequestResponseScenario
public RequestResponseScenario(java.lang.String inputChannelName, java.lang.String outputChannelName)Create an instance- Parameters:
inputChannelName- the input channel nameoutputChannelName- the output channel name
-
-
Method Details
-
getMessage
protected org.springframework.messaging.Message<? extends java.lang.Object> getMessage() -
getInputChannelName
public java.lang.String getInputChannelName()- Returns:
- the input channel name
-
getOutputChannelName
public java.lang.String getOutputChannelName()- Returns:
- the output channel name
-
getPayload
public java.lang.Object getPayload()- Returns:
- the request message payload
-
setPayload
set the payload of the request message- Parameters:
payload- The payload.- Returns:
- this
-
getName
public java.lang.String getName()- Returns:
- the scenario name
-
setName
Set the scenario name (optional)- Parameters:
name- the name- Returns:
- this
-
getResponseValidator
- Returns:
- the response validator
- See Also:
AbstractResponseValidator
-
setResponseValidator
public RequestResponseScenario setResponseValidator(AbstractResponseValidator<?> responseValidator)Set the response validator- Parameters:
responseValidator- The response validator.- Returns:
- this
- See Also:
AbstractResponseValidator
-
setMessage
Set the request message (as an alternative to setPayload())- Parameters:
message- The message.- Returns:
- this
-
init
protected void init()
-