org.springframework.integration.aggregator
Class ExpressionEvaluatingMessageGroupProcessor

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

public class ExpressionEvaluatingMessageGroupProcessor
extends AbstractAggregatingMessageGroupProcessor
implements BeanFactoryAware

A MessageGroupProcessor implementation that evaluates a SpEL expression. The SpEL context root is the list of all Messages in the group. The evaluation result can be any Object and is send as new Message payload to the output channel.


Constructor Summary
ExpressionEvaluatingMessageGroupProcessor(java.lang.String expression)
           
 
Method Summary
protected  java.lang.Object aggregatePayloads(MessageGroup group, java.util.Map<java.lang.String,java.lang.Object> headers)
          Evaluate the expression provided on the unmarked messages (a collection) in the group, and delegate to the MessagingTemplate to send downstream.
 void setBeanFactory(BeanFactory beanFactory)
           
 void setConversionService(ConversionService conversionService)
           
 void setExpectedType(java.lang.Class<?> expectedType)
           
 
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

ExpressionEvaluatingMessageGroupProcessor

public ExpressionEvaluatingMessageGroupProcessor(java.lang.String expression)
Method Detail

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
Specified by:
setBeanFactory in interface BeanFactoryAware

setConversionService

public void setConversionService(ConversionService conversionService)

setExpectedType

public void setExpectedType(java.lang.Class<?> expectedType)

aggregatePayloads

protected java.lang.Object aggregatePayloads(MessageGroup group,
                                             java.util.Map<java.lang.String,java.lang.Object> headers)
Evaluate the expression provided on the unmarked messages (a collection) in the group, and delegate to the MessagingTemplate to send downstream.

Specified by:
aggregatePayloads in class AbstractAggregatingMessageGroupProcessor