Class ExpressionEvaluatingMessageProcessor<T>
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.handler.AbstractMessageProcessor<T>
org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor<T>
- Type Parameters:
T
- the expected payload type.
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,InitializingBean
,MessageProcessor<T>
A
MessageProcessor
implementation that evaluates a SpEL expression
with the Message itself as the root object within the evaluation context.- Since:
- 2.0
- Author:
- Mark Fisher, Artem Bilan, Gary Russell
-
Field Summary
Fields inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
EXPRESSION_PARSER, logger
-
Constructor Summary
ConstructorDescriptionExpressionEvaluatingMessageProcessor
(String expression) Create anExpressionEvaluatingMessageProcessor
for the given expression.ExpressionEvaluatingMessageProcessor
(String expression, Class<T> expectedType) ConstructExpressionEvaluatingMessageProcessor
for the provided SpEL expression and expected result type.ExpressionEvaluatingMessageProcessor
(Expression expression) Create anExpressionEvaluatingMessageProcessor
for the given expression.ExpressionEvaluatingMessageProcessor
(Expression expression, Class<T> expectedType) Create anExpressionEvaluatingMessageProcessor
for the given expression and expected type for its evaluation result. -
Method Summary
Modifier and TypeMethodDescriptionprocessMessage
(Message<?> message) Processes the Message by evaluating the expression with that Message as the root object.toString()
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
-
ExpressionEvaluatingMessageProcessor
Create anExpressionEvaluatingMessageProcessor
for the given expression.- Parameters:
expression
- The expression.
-
ExpressionEvaluatingMessageProcessor
Create anExpressionEvaluatingMessageProcessor
for the given expression and expected type for its evaluation result.- Parameters:
expression
- The expression.expectedType
- The expected type.
-
ExpressionEvaluatingMessageProcessor
Create anExpressionEvaluatingMessageProcessor
for the given expression.- Parameters:
expression
- a SpEL expression to evaluate.- Since:
- 5.0
-
ExpressionEvaluatingMessageProcessor
ConstructExpressionEvaluatingMessageProcessor
for the provided SpEL expression and expected result type.- Parameters:
expression
- a SpEL expression to evaluate.expectedType
- the expected result type.- Since:
- 5.0
-
-
Method Details
-
processMessage
Processes the Message by evaluating the expression with that Message as the root object. The expression evaluation result Object will be returned.- Specified by:
processMessage
in interfaceMessageProcessor<T>
- Specified by:
processMessage
in classAbstractMessageProcessor<T>
- Parameters:
message
- The message.- Returns:
- The result of processing the message.
-
toString
-