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
ConstructorsConstructorDescriptionExpressionEvaluatingHeaderValueMessageProcessor(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).voidsetBeanFactory(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- theExpressionto evaluate.expectedType- the type for return value ofexpressionevaluation 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- theStringexpression presentation to evaluate.expectedType- the type for return value ofexpressionevaluation result.
-
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware
-
processMessage
Description copied from interface:MessageProcessorProcess the Message and return a value (or null).- Specified by:
processMessagein interfaceMessageProcessor<T>- Parameters:
message- The message to process.- Returns:
- The result.
-