Spring Integration

org.springframework.integration.aop
Class MethodAnnotationExpressionSource

java.lang.Object
  extended by org.springframework.integration.aop.MethodAnnotationExpressionSource

public class MethodAnnotationExpressionSource
extends Object

An ExpressionSource implementation that retrieves the expression string and evaluation context variable names from an annotation.

Since:
2.0
Author:
Mark Fisher

Field Summary
static String DEFAULT_ARGUMENT_MAP_VARIABLE_NAME
           
static String DEFAULT_EXCEPTION_VARIABLE_NAME
           
static String DEFAULT_METHOD_NAME_VARIABLE_NAME
           
static String DEFAULT_RETURN_VALUE_VARIABLE_NAME
           
 
Constructor Summary
MethodAnnotationExpressionSource()
           
MethodAnnotationExpressionSource(Set<Class<? extends Annotation>> annotationTypes)
           
 
Method Summary
 String getArgumentMapVariableName(Method method)
          Returns the variable name to use in the evaluation context for the Map of arguments.
 String[] getArgumentVariableNames(Method method)
          Returns the variable names to be associated with the intercepted method invocation's argument array.
 String getChannelName(Method method)
          Returns the channel name to which Messages should be published for this particular method invocation.
 String getExceptionVariableName(Method method)
          Returns the variable name to use in the evaluation context for any exception thrown from the method invocation.
 Map<String,String> getHeaderExpressions(Method method)
          Returns the map of expression strings to be evaluated for any headers that should be set on the published Message.
 String getMethodNameVariableName(Method method)
          Returns the variable name to be associated with the intercepted method's name.
 String getPayloadExpression(Method method)
          Returns the expression string to be evaluated for creating the Message payload.
 String getReturnValueVariableName(Method method)
          Returns the variable name to use in the evaluation context for any return value resulting from the method invocation.
 void setChannelAttributeName(String channelAttributeName)
           
 
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 String DEFAULT_METHOD_NAME_VARIABLE_NAME
See Also:
Constant Field Values

DEFAULT_ARGUMENT_MAP_VARIABLE_NAME

public static final String DEFAULT_ARGUMENT_MAP_VARIABLE_NAME
See Also:
Constant Field Values

DEFAULT_RETURN_VALUE_VARIABLE_NAME

public static final String DEFAULT_RETURN_VALUE_VARIABLE_NAME
See Also:
Constant Field Values

DEFAULT_EXCEPTION_VARIABLE_NAME

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

MethodAnnotationExpressionSource

public MethodAnnotationExpressionSource()

MethodAnnotationExpressionSource

public MethodAnnotationExpressionSource(Set<Class<? extends Annotation>> annotationTypes)
Method Detail

setChannelAttributeName

public void setChannelAttributeName(String channelAttributeName)

getPayloadExpression

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


getHeaderExpressions

public Map<String,String> getHeaderExpressions(Method method)
Returns the map of expression strings to be evaluated for any headers that should be set on the published Message. The keys in the Map are header names, the values are the expression strings.


getMethodNameVariableName

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


getArgumentVariableNames

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


getArgumentMapVariableName

public String getArgumentMapVariableName(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 getArgumentVariableNames(Method) method.


getReturnValueVariableName

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


getExceptionVariableName

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


getChannelName

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


Spring Integration

Copyright © 2010. All Rights Reserved.