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
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.-
Field Summary
Fields inherited from class org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
logger
-
Constructor Summary
Constructors Constructor Description ExpressionEvaluatingMessageGroupProcessor(java.lang.String expression)
-
Method Summary
Modifier and Type Method 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 theMessagingTemplate
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 org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
aggregateHeaders, getHeadersFunction, getMessageBuilderFactory, processMessageGroup, setHeadersFunction
-
Constructor Details
-
ExpressionEvaluatingMessageGroupProcessor
public ExpressionEvaluatingMessageGroupProcessor(java.lang.String expression)
-
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
- Overrides:
setBeanFactory
in classAbstractAggregatingMessageGroupProcessor
-
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 theMessagingTemplate
to send downstream.- Specified by:
aggregatePayloads
in classAbstractAggregatingMessageGroupProcessor
-