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:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,MessageProcessor<T>
,HeaderValueMessageProcessor<T>
public class ExpressionEvaluatingHeaderValueMessageProcessor<T> extends AbstractHeaderValueMessageProcessor<T> implements org.springframework.beans.factory.BeanFactoryAware
- Since:
- 3.0
-
Constructor Summary
Constructors Constructor Description ExpressionEvaluatingHeaderValueMessageProcessor(java.lang.String expressionString, java.lang.Class<T> expectedType)
Create a header value processor for the given expression string and the expected type of the expression evaluation result.ExpressionEvaluatingHeaderValueMessageProcessor(org.springframework.expression.Expression expression, java.lang.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 Type Method Description T
processMessage(org.springframework.messaging.Message<?> message)
Process the Message and return a value (or null).void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Methods inherited from class org.springframework.integration.transformer.support.AbstractHeaderValueMessageProcessor
isOverwrite, setOverwrite
-
Constructor Details
-
ExpressionEvaluatingHeaderValueMessageProcessor
public ExpressionEvaluatingHeaderValueMessageProcessor(org.springframework.expression.Expression expression, java.lang.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(java.lang.String expressionString, java.lang.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
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
-
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.
-