org.springframework.integration.aop
Class AbstractExpressionSource

java.lang.Object
  extended by org.springframework.integration.aop.AbstractExpressionSource
Direct Known Subclasses:
MethodNameMappingExpressionSource, SimpleExpressionSource

public abstract class AbstractExpressionSource
extends java.lang.Object

Base class for ExpressionSource implementations.

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
AbstractExpressionSource()
           
 
Method Summary
protected  java.lang.String[] discoverMethodParameterNames(java.lang.reflect.Method method)
           
 java.lang.String getArgumentMapVariableName(java.lang.reflect.Method method)
          Returns the variable name to use in the evaluation context for the Map of arguments.
abstract  java.lang.String[] getArgumentVariableNames(java.lang.reflect.Method method)
          Returns the variable names to be associated with the intercepted method invocation's argument array.
abstract  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 getExceptionVariableName(java.lang.reflect.Method method)
          Returns the variable name to use in the evaluation context for any exception thrown from the method invocation.
abstract  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 getMethodNameVariableName(java.lang.reflect.Method method)
          Returns the variable name to be associated with the intercepted method's name.
abstract  java.lang.String getPayloadExpression(java.lang.reflect.Method method)
          Returns the expression string to be evaluated for creating the Message payload.
 java.lang.String getReturnValueVariableName(java.lang.reflect.Method method)
          Returns the variable name to use in the evaluation context for any return value resulting from the method invocation.
 void setArgumentMapVariableName(java.lang.String argumentMapVariableName)
           
 void setExceptionVariableName(java.lang.String exceptionVariableName)
           
 void setMethodNameVariableName(java.lang.String methodNameVariableName)
           
 void setReturnValueVariableName(java.lang.String returnValueVariableName)
           
 
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

AbstractExpressionSource

public AbstractExpressionSource()
Method Detail

setMethodNameVariableName

public void setMethodNameVariableName(java.lang.String methodNameVariableName)

getMethodNameVariableName

public java.lang.String getMethodNameVariableName(java.lang.reflect.Method method)
Returns the variable name to be associated with the intercepted method's name.


setArgumentMapVariableName

public void setArgumentMapVariableName(java.lang.String argumentMapVariableName)

getArgumentMapVariableName

public java.lang.String getArgumentMapVariableName(java.lang.reflect.Method method)
Returns the variable name to use in the evaluation context for the Map of arguments. The keys in this map will be determined by the result of the #getArgumentNames(Method) method.


setExceptionVariableName

public void setExceptionVariableName(java.lang.String exceptionVariableName)

getExceptionVariableName

public java.lang.String getExceptionVariableName(java.lang.reflect.Method method)
Returns the variable name to use in the evaluation context for any exception thrown from the method invocation.


setReturnValueVariableName

public void setReturnValueVariableName(java.lang.String returnValueVariableName)

getReturnValueVariableName

public java.lang.String getReturnValueVariableName(java.lang.reflect.Method method)
Returns the variable name to use in the evaluation context for any return value resulting from the method invocation.


discoverMethodParameterNames

protected java.lang.String[] discoverMethodParameterNames(java.lang.reflect.Method method)

getPayloadExpression

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


getArgumentVariableNames

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


getHeaderExpressions

public abstract 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.


getChannelName

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