Class ExpressionEvaluatingHeaderValueMessageProcessor<T>
java.lang.Object
org.springframework.integration.transformer.support.AbstractHeaderValueMessageProcessor<T>
org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor<T>
- Type Parameters:
T
- ther paylaod type.
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,MessageProcessor<T>
,HeaderValueMessageProcessor<T>
public class ExpressionEvaluatingHeaderValueMessageProcessor<T>
extends AbstractHeaderValueMessageProcessor<T>
implements BeanFactoryAware
- Since:
- 3.0
- Author:
- Mark Fisher, Artem Bilan
-
Constructor Summary
ConstructorDescriptionExpressionEvaluatingHeaderValueMessageProcessor
(String expressionString, Class<T> expectedType) Create a header value processor for the given expression string and the expected type of the expression evaluation result.ExpressionEvaluatingHeaderValueMessageProcessor
(Expression expression, Class<T> expectedType) Create a header value processor for the given Expression and the expected type of the expression evaluation result. -
Method Summary
Modifier and TypeMethodDescriptionprocessMessage
(Message<?> message) Process the Message and return a value (or null).void
setBeanFactory
(BeanFactory beanFactory) Methods inherited from class org.springframework.integration.transformer.support.AbstractHeaderValueMessageProcessor
isOverwrite, setOverwrite
-
Constructor Details
-
ExpressionEvaluatingHeaderValueMessageProcessor
public ExpressionEvaluatingHeaderValueMessageProcessor(Expression expression, Class<T> expectedType) Create a header value processor for the given Expression and the expected type of the expression evaluation result. The expectedType may be null if unknown.- Parameters:
expression
- theExpression
to evaluate.expectedType
- the type for return value ofexpression
evaluation result.
-
ExpressionEvaluatingHeaderValueMessageProcessor
public ExpressionEvaluatingHeaderValueMessageProcessor(String expressionString, Class<T> expectedType) Create a header value processor for the given expression string and the expected type of the expression evaluation result. The expectedType may be null if unknown.- Parameters:
expressionString
- theString
expression presentation to evaluate.expectedType
- the type for return value ofexpression
evaluation result.
-
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
-
processMessage
Description copied from interface:MessageProcessor
Process the Message and return a value (or null).- Specified by:
processMessage
in interfaceMessageProcessor<T>
- Parameters:
message
- The message to process.- Returns:
- The result.
-