org.springframework.integration.aggregator
Class ExpressionEvaluatingMessageGroupProcessor
java.lang.Object
org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
org.springframework.integration.aggregator.ExpressionEvaluatingMessageGroupProcessor
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, MessageGroupProcessor
public class ExpressionEvaluatingMessageGroupProcessor
- extends AbstractAggregatingMessageGroupProcessor
- implements org.springframework.beans.factory.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
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 messages (a collection) in the group, and delegate to the
MessagingTemplate to send downstream. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
|
void |
setConversionService(org.springframework.core.convert.ConversionService conversionService)
|
void |
setExpectedType(java.lang.Class<?> expectedType)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpressionEvaluatingMessageGroupProcessor
public ExpressionEvaluatingMessageGroupProcessor(java.lang.String expression)
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
- Specified by:
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
setConversionService
public void setConversionService(org.springframework.core.convert.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 messages (a collection) in the group, and delegate to the
MessagingTemplate
to send downstream.
- Specified by:
aggregatePayloads
in class AbstractAggregatingMessageGroupProcessor