public class ExpressionEvaluatingMessageGroupProcessor extends AbstractAggregatingMessageGroupProcessor implements org.springframework.beans.factory.BeanFactoryAware
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 and Description |
---|
ExpressionEvaluatingMessageGroupProcessor(java.lang.String expression) |
Modifier and Type | Method and Description |
---|---|
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) |
aggregateHeaders, processMessageGroup
public ExpressionEvaluatingMessageGroupProcessor(java.lang.String expression)
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
public void setConversionService(org.springframework.core.convert.ConversionService conversionService)
public void setExpectedType(java.lang.Class<?> expectedType)
protected java.lang.Object aggregatePayloads(MessageGroup group, java.util.Map<java.lang.String,java.lang.Object> headers)
MessagingTemplate
to send downstream.aggregatePayloads
in class AbstractAggregatingMessageGroupProcessor