Spring Integration

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.

Author:
Alex Peters, Dave Syer

Constructor Summary
ExpressionEvaluatingMessageGroupProcessor(String expression)
           
 
Method Summary
protected  Object aggregatePayloads(MessageGroup group, Map<String,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(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(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(Class<?> expectedType)

aggregatePayloads

protected Object aggregatePayloads(MessageGroup group,
                                   Map<String,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

Spring Integration

Copyright © 2010. All Rights Reserved.