public class ExpressionEvaluatingMessageProcessor<T> extends AbstractMessageProcessor<T>
MessageProcessor
implementation that evaluates a SpEL expression
with the Message itself as the root object within the evaluation context.EXPRESSION_PARSER, logger
Constructor and Description |
---|
ExpressionEvaluatingMessageProcessor(Expression expression)
Create an
ExpressionEvaluatingMessageProcessor for the given expression. |
ExpressionEvaluatingMessageProcessor(Expression expression,
Class<T> expectedType)
Create an
ExpressionEvaluatingMessageProcessor for the given expression
and expected type for its evaluation result. |
ExpressionEvaluatingMessageProcessor(String expression)
Create an
ExpressionEvaluatingMessageProcessor for the given expression. |
ExpressionEvaluatingMessageProcessor(String expression,
Class<T> expectedType)
Construct
ExpressionEvaluatingMessageProcessor for the provided
SpEL expression and expected result type. |
Modifier and Type | Method and Description |
---|---|
T |
processMessage(Message<?> message)
Processes the Message by evaluating the expression with that Message as the
root object.
|
String |
toString() |
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, onInit, setBeanFactory, setConversionService
public ExpressionEvaluatingMessageProcessor(Expression expression)
ExpressionEvaluatingMessageProcessor
for the given expression.expression
- The expression.public ExpressionEvaluatingMessageProcessor(Expression expression, @Nullable Class<T> expectedType)
ExpressionEvaluatingMessageProcessor
for the given expression
and expected type for its evaluation result.expression
- The expression.expectedType
- The expected type.public ExpressionEvaluatingMessageProcessor(String expression)
ExpressionEvaluatingMessageProcessor
for the given expression.expression
- a SpEL expression to evaluate.public ExpressionEvaluatingMessageProcessor(String expression, @Nullable Class<T> expectedType)
ExpressionEvaluatingMessageProcessor
for the provided
SpEL expression and expected result type.expression
- a SpEL expression to evaluate.expectedType
- the expected result type.public T processMessage(Message<?> message)
processMessage
in interface MessageProcessor<T>
processMessage
in class AbstractMessageProcessor<T>
message
- The message.