Spring Integration

org.springframework.integration.util
Class MessagingMethodInvokerHelper<T>

java.lang.Object
  extended by org.springframework.integration.util.AbstractExpressionEvaluator
      extended by org.springframework.integration.util.MessagingMethodInvokerHelper<T>
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware

public class MessagingMethodInvokerHelper<T>
extends AbstractExpressionEvaluator

A helper class for processors that invoke a method on a target Object using a combination of message payload(s) and headers as arguments. The Method instance or method name may be provided as a constructor argument. If a method name is provided, and more than one declared method has that name, the method-selection will be dynamic, based on the underlying SpEL method resolution. Alternatively, an annotation type may be provided so that the candidates for SpEL's method resolution are determined by the presence of that annotation rather than the method name.

Since:
2.0
Author:
Mark Fisher, Oleg Zhurakousky, Dave Syer, Gunnar Hillert

Constructor Summary
MessagingMethodInvokerHelper(java.lang.Object targetObject, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, boolean canProcessMessageList)
           
MessagingMethodInvokerHelper(java.lang.Object targetObject, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.lang.Class<?> expectedType, boolean canProcessMessageList)
           
MessagingMethodInvokerHelper(java.lang.Object targetObject, java.lang.reflect.Method method, boolean canProcessMessageList)
           
MessagingMethodInvokerHelper(java.lang.Object targetObject, java.lang.reflect.Method method, java.lang.Class<?> expectedType, boolean canProcessMessageList)
           
MessagingMethodInvokerHelper(java.lang.Object targetObject, java.lang.String methodName, boolean canProcessMessageList)
           
MessagingMethodInvokerHelper(java.lang.Object targetObject, java.lang.String methodName, java.lang.Class<?> expectedType, boolean canProcessMessageList)
           
 
Method Summary
 T process(java.util.Collection<Message<?>> messages, java.util.Map<java.lang.String,?> headers)
           
 T process(Message<?> message)
           
 java.lang.String toString()
           
 
Methods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getEvaluationContext, setBeanFactory, setBeanResolver, setConversionService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessagingMethodInvokerHelper

public MessagingMethodInvokerHelper(java.lang.Object targetObject,
                                    java.lang.reflect.Method method,
                                    java.lang.Class<?> expectedType,
                                    boolean canProcessMessageList)

MessagingMethodInvokerHelper

public MessagingMethodInvokerHelper(java.lang.Object targetObject,
                                    java.lang.reflect.Method method,
                                    boolean canProcessMessageList)

MessagingMethodInvokerHelper

public MessagingMethodInvokerHelper(java.lang.Object targetObject,
                                    java.lang.String methodName,
                                    java.lang.Class<?> expectedType,
                                    boolean canProcessMessageList)

MessagingMethodInvokerHelper

public MessagingMethodInvokerHelper(java.lang.Object targetObject,
                                    java.lang.String methodName,
                                    boolean canProcessMessageList)

MessagingMethodInvokerHelper

public MessagingMethodInvokerHelper(java.lang.Object targetObject,
                                    java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
                                    boolean canProcessMessageList)

MessagingMethodInvokerHelper

public MessagingMethodInvokerHelper(java.lang.Object targetObject,
                                    java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
                                    java.lang.Class<?> expectedType,
                                    boolean canProcessMessageList)
Method Detail

process

public T process(Message<?> message)
          throws java.lang.Exception
Throws:
java.lang.Exception

process

public T process(java.util.Collection<Message<?>> messages,
                 java.util.Map<java.lang.String,?> headers)
          throws java.lang.Exception
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Integration