org.springframework.integration.aop
Class SimpleExpressionSource

java.lang.Object
  extended by org.springframework.integration.aop.AbstractExpressionSource
      extended by org.springframework.integration.aop.SimpleExpressionSource

public class SimpleExpressionSource
extends AbstractExpressionSource

Simple implementation of ExpressionSource that allows for configuration of a single channel name, payload expression, and array of header key=value expressions.

Since:
2.0
Author:
Mark Fisher

Field Summary
static java.lang.String DEFAULT_ARGUMENT_MAP_VARIABLE_NAME
           
static java.lang.String DEFAULT_EXCEPTION_VARIABLE_NAME
           
static java.lang.String DEFAULT_METHOD_NAME_VARIABLE_NAME
           
static java.lang.String DEFAULT_RETURN_VALUE_VARIABLE_NAME
           
 
Constructor Summary
SimpleExpressionSource()
           
 
Method Summary
 java.lang.String[] getArgumentVariableNames(java.lang.reflect.Method method)
          Returns the variable names to be associated with the intercepted method invocation's argument array.
 java.lang.String getChannelName(java.lang.reflect.Method method)
          Returns the channel name to which Messages should be published for this particular method invocation.
 java.lang.String[] getHeaderExpressions(java.lang.reflect.Method method)
          Returns the array of expression strings to be evaluated for any headers that should be set on the published Message.
 java.lang.String getPayloadExpression(java.lang.reflect.Method method)
          Returns the expression string to be evaluated for creating the Message payload.
 void setChannelName(java.lang.String channelName)
           
 void setHeaderExpressions(java.lang.String[] headerExpressions)
           
 void setPayloadExpression(java.lang.String payloadExpression)
           
 
Methods inherited from class org.springframework.integration.aop.AbstractExpressionSource
discoverMethodParameterNames, getArgumentMapVariableName, getExceptionVariableName, getMethodNameVariableName, getReturnValueVariableName, setArgumentMapVariableName, setExceptionVariableName, setMethodNameVariableName, setReturnValueVariableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_METHOD_NAME_VARIABLE_NAME

public static final java.lang.String DEFAULT_METHOD_NAME_VARIABLE_NAME
See Also:
Constant Field Values

DEFAULT_ARGUMENT_MAP_VARIABLE_NAME

public static final java.lang.String DEFAULT_ARGUMENT_MAP_VARIABLE_NAME
See Also:
Constant Field Values

DEFAULT_RETURN_VALUE_VARIABLE_NAME

public static final java.lang.String DEFAULT_RETURN_VALUE_VARIABLE_NAME
See Also:
Constant Field Values

DEFAULT_EXCEPTION_VARIABLE_NAME

public static final java.lang.String DEFAULT_EXCEPTION_VARIABLE_NAME
See Also:
Constant Field Values
Constructor Detail

SimpleExpressionSource

public SimpleExpressionSource()
Method Detail

setChannelName

public void setChannelName(java.lang.String channelName)

getChannelName

public java.lang.String getChannelName(java.lang.reflect.Method method)
Returns the channel name to which Messages should be published for this particular method invocation.

Specified by:
getChannelName in class AbstractExpressionSource

setPayloadExpression

public void setPayloadExpression(java.lang.String payloadExpression)

getPayloadExpression

public java.lang.String getPayloadExpression(java.lang.reflect.Method method)
Returns the expression string to be evaluated for creating the Message payload.

Specified by:
getPayloadExpression in class AbstractExpressionSource

setHeaderExpressions

public void setHeaderExpressions(java.lang.String[] headerExpressions)

getHeaderExpressions

public java.lang.String[] getHeaderExpressions(java.lang.reflect.Method method)
Returns the array of expression strings to be evaluated for any headers that should be set on the published Message.

Specified by:
getHeaderExpressions in class AbstractExpressionSource

getArgumentVariableNames

public java.lang.String[] getArgumentVariableNames(java.lang.reflect.Method method)
Returns the variable names to be associated with the intercepted method invocation's argument array.

Specified by:
getArgumentVariableNames in class AbstractExpressionSource