Spring Integration

org.springframework.integration.handler
Class MethodInvokingMessageProcessor

java.lang.Object
  extended by org.springframework.integration.handler.AbstractMessageProcessor
      extended by org.springframework.integration.handler.MethodInvokingMessageProcessor
All Implemented Interfaces:
MessageProcessor
Direct Known Subclasses:
MethodInvokingMessageHandler

public class MethodInvokingMessageProcessor
extends AbstractMessageProcessor

A MessageProcessor implementation that invokes a method on a target Object. 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

Constructor Summary
MethodInvokingMessageProcessor(Object targetObject, Class<? extends Annotation> annotationType)
           
MethodInvokingMessageProcessor(Object targetObject, Method method)
           
MethodInvokingMessageProcessor(Object targetObject, String methodName)
           
MethodInvokingMessageProcessor(Object targetObject, String methodName, boolean requiresReply)
           
 
Method Summary
 Object processMessage(Message<?> message)
          Process the Message and return a value (or null).
 String toString()
           
 
Methods inherited from class org.springframework.integration.handler.AbstractMessageProcessor
evaluateExpression, getEvaluationContext, setConversionService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodInvokingMessageProcessor

public MethodInvokingMessageProcessor(Object targetObject,
                                      Method method)

MethodInvokingMessageProcessor

public MethodInvokingMessageProcessor(Object targetObject,
                                      String methodName)

MethodInvokingMessageProcessor

public MethodInvokingMessageProcessor(Object targetObject,
                                      String methodName,
                                      boolean requiresReply)

MethodInvokingMessageProcessor

public MethodInvokingMessageProcessor(Object targetObject,
                                      Class<? extends Annotation> annotationType)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

processMessage

public Object processMessage(Message<?> message)
Description copied from interface: MessageProcessor
Process the Message and return a value (or null).


Spring Integration

Copyright © 2010. All Rights Reserved.