org.springframework.integration.aggregator
Class MethodInvokingMessageGroupProcessor

java.lang.Object
  extended by org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
      extended by org.springframework.integration.aggregator.MethodInvokingMessageGroupProcessor
All Implemented Interfaces:
MessageGroupProcessor

public class MethodInvokingMessageGroupProcessor
extends AbstractAggregatingMessageGroupProcessor

MessageGroupProcessor that serves as an adapter for the invocation of a POJO method.

Since:
2.0

Constructor Summary
MethodInvokingMessageGroupProcessor(java.lang.Object target)
          Creates a wrapper around the object passed in.
MethodInvokingMessageGroupProcessor(java.lang.Object target, java.lang.reflect.Method method)
          Creates a wrapper around the object passed in.
MethodInvokingMessageGroupProcessor(java.lang.Object target, java.lang.String methodName)
          Creates a wrapper around the object passed in.
 
Method Summary
protected  java.lang.Object aggregatePayloads(MessageGroup group, java.util.Map<java.lang.String,java.lang.Object> headers)
           
 void setBeanFactory(BeanFactory beanFactory)
           
 void setConversionService(ConversionService conversionService)
           
 
Methods inherited from class org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
aggregateHeaders, processMessageGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodInvokingMessageGroupProcessor

public MethodInvokingMessageGroupProcessor(java.lang.Object target)
Creates a wrapper around the object passed in. This constructor will look for a method that can process a list of messages.

Parameters:
target - the object to wrap

MethodInvokingMessageGroupProcessor

public MethodInvokingMessageGroupProcessor(java.lang.Object target,
                                           java.lang.String methodName)
Creates a wrapper around the object passed in. This constructor will look for a named method specifically and fail when it cannot find a method with the given name.

Parameters:
target - the object to wrap
methodName - the name of the method to invoke

MethodInvokingMessageGroupProcessor

public MethodInvokingMessageGroupProcessor(java.lang.Object target,
                                           java.lang.reflect.Method method)
Creates a wrapper around the object passed in.

Parameters:
target - the object to wrap
method - the method to invoke
Method Detail

setConversionService

public void setConversionService(ConversionService conversionService)

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)

aggregatePayloads

protected final java.lang.Object aggregatePayloads(MessageGroup group,
                                                   java.util.Map<java.lang.String,java.lang.Object> headers)
Specified by:
aggregatePayloads in class AbstractAggregatingMessageGroupProcessor