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 Summary
Constructors Constructor Description RequestResponseScenario(String inputChannelName, String outputChannelName)
Create an instance -
Method Summary
Modifier and Type Method Description String
getInputChannelName()
protected Message<? extends Object>
getMessage()
String
getName()
String
getOutputChannelName()
Object
getPayload()
AbstractResponseValidator<?>
getResponseValidator()
protected void
init()
RequestResponseScenario
setMessage(Message<?> message)
Set the request message (as an alternative to setPayload())RequestResponseScenario
setName(String name)
Set the scenario name (optional)RequestResponseScenario
setPayload(Object payload)
set the payload of the request messageRequestResponseScenario
setResponseValidator(AbstractResponseValidator<?> responseValidator)
Set the response validator
-
Constructor Details
-
RequestResponseScenario
Create an instance- Parameters:
inputChannelName
- the input channel nameoutputChannelName
- the output channel name
-
-
Method Details
-
getMessage
-
getInputChannelName
- Returns:
- the input channel name
-
getOutputChannelName
- Returns:
- the output channel name
-
getPayload
- Returns:
- the request message payload
-
setPayload
set the payload of the request message- Parameters:
payload
- The payload.- Returns:
- this
-
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()
-