Spring Integration

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
Author:
Iwein Fuld, Mark Fisher

Constructor Summary
MethodInvokingMessageGroupProcessor(Object target)
          Creates a wrapper around the target passed in.
MethodInvokingMessageGroupProcessor(Object target, String method)
          Creates a wrapper around the object passed in.
 
Method Summary
protected  Object aggregatePayloads(MessageGroup group)
           
 
Methods inherited from class org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
aggregateHeaders, processAndSend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodInvokingMessageGroupProcessor

public MethodInvokingMessageGroupProcessor(Object target)
Creates a wrapper around the target passed in. This constructor will choose the best fitting method and throw an exception when methods are ambiguous or no fitting methods can be found.

Parameters:
target - the object to wrap
Throws:
IllegalStateException - when no single method can be found unambiguously

MethodInvokingMessageGroupProcessor

public MethodInvokingMessageGroupProcessor(Object target,
                                           String method)
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
method - the name of the method to look for
Method Detail

aggregatePayloads

protected final Object aggregatePayloads(MessageGroup group)
Specified by:
aggregatePayloads in class AbstractAggregatingMessageGroupProcessor

Spring Integration

Copyright © 2010. All Rights Reserved.