Spring Integration

org.springframework.integration.test.support
Class RequestResponseScenario

java.lang.Object
  extended by 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.

Author:
David Turanski

Constructor Summary
RequestResponseScenario(java.lang.String inputChannelName, java.lang.String outputChannelName)
          Create an instance
 
Method Summary
 java.lang.String getInputChannelName()
           
protected  Message<? extends java.lang.Object> getMessage()
           
 java.lang.String getName()
           
 java.lang.String getOutputChannelName()
           
 java.lang.Object getPayload()
           
 AbstractResponseValidator<?> getResponseValidator()
           
protected  void init()
           
 RequestResponseScenario setMessage(Message<?> message)
          Set the request message (as an alternative to setPayload())
 RequestResponseScenario setName(java.lang.String name)
          set the scenario name (optional)
 RequestResponseScenario setPayload(java.lang.Object payload)
          set the payload of the request message
 RequestResponseScenario setResponseValidator(AbstractResponseValidator<?> responseValidator)
          Set the response validator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestResponseScenario

public RequestResponseScenario(java.lang.String inputChannelName,
                               java.lang.String outputChannelName)
Create an instance

Parameters:
inputChannelName - the input channel name
outputChannelName - the output channel name
Method Detail

getMessage

protected 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

public RequestResponseScenario setPayload(java.lang.Object payload)
set the payload of the request message

Parameters:
payload -
Returns:
this

getName

public java.lang.String getName()
Returns:
the scenario name

setName

public RequestResponseScenario setName(java.lang.String name)
set the scenario name (optional)

Parameters:
name - the name
Returns:
this

getResponseValidator

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

setResponseValidator

public RequestResponseScenario setResponseValidator(AbstractResponseValidator<?> responseValidator)
Set the response validator

Parameters:
responseValidator -
Returns:
this
See Also:
AbstractResponseValidator

setMessage

public RequestResponseScenario setMessage(Message<?> message)
Set the request message (as an alternative to setPayload())

Parameters:
message -
Returns:
this

init

protected void init()

Spring Integration