Class ExpressionEvaluatingMessageListProcessor
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.aggregator.ExpressionEvaluatingMessageListProcessor
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,InitializingBean
,MessageListProcessor
public class ExpressionEvaluatingMessageListProcessor
extends AbstractExpressionEvaluator
implements MessageListProcessor
A base class for aggregators that evaluates a SpEL expression with the message list as the root object within the
evaluation context.
- Since:
- 2.0
- Author:
- Dave Syer, Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
EXPRESSION_PARSER, logger
-
Constructor Summary
ConstructorDescriptionExpressionEvaluatingMessageListProcessor
(String expression) ConstructExpressionEvaluatingMessageListProcessor
for the provided SpEL expression and expected result type.ExpressionEvaluatingMessageListProcessor
(String expression, Class<?> expectedType) ConstructExpressionEvaluatingMessageListProcessor
for the provided SpEL expression and expected result type.ExpressionEvaluatingMessageListProcessor
(Expression expression) ConstructExpressionEvaluatingMessageListProcessor
for the provided expression.ExpressionEvaluatingMessageListProcessor
(Expression expression, Class<?> expectedType) ConstructExpressionEvaluatingMessageListProcessor
for the provided expression and expected result type. -
Method Summary
Modifier and TypeMethodDescriptionprocess
(Collection<? extends Message<?>> messages) Processes the Message by evaluating the expression with that Message as the root object.void
setExpectedType
(Class<?> expectedType) Set the result type expected from evaluation of the expression.Methods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, onInit, setBeanFactory, setConversionService, setSimpleEvaluationContext
-
Constructor Details
-
ExpressionEvaluatingMessageListProcessor
ConstructExpressionEvaluatingMessageListProcessor
for the provided SpEL expression and expected result type.- Parameters:
expression
- a SpEL expression to evaluate inprocess(Collection)
.expectedType
- an expected result type.- Since:
- 5.0
-
ExpressionEvaluatingMessageListProcessor
ConstructExpressionEvaluatingMessageListProcessor
for the provided SpEL expression and expected result type.- Parameters:
expression
- a SpEL expression to evaluate inprocess(Collection)
.- Since:
- 5.0
-
ExpressionEvaluatingMessageListProcessor
ConstructExpressionEvaluatingMessageListProcessor
for the provided expression and expected result type.- Parameters:
expression
- an expression to evaluate inprocess(Collection)
.expectedType
- an expected result type.- Since:
- 5.0
-
ExpressionEvaluatingMessageListProcessor
ConstructExpressionEvaluatingMessageListProcessor
for the provided expression.- Parameters:
expression
- an expression to evaluate inprocess(Collection)
.- Since:
- 5.0
-
-
Method Details
-
setExpectedType
Set the result type expected from evaluation of the expression.- Parameters:
expectedType
- The expected type.
-
process
Processes the Message by evaluating the expression with that Message as the root object. The expression evaluation result Object will be returned.- Specified by:
process
in interfaceMessageListProcessor
-