Spring Integration

org.springframework.integration.handler
Class ExpressionEvaluatingMessageProcessor<T>

java.lang.Object
  extended by org.springframework.integration.util.AbstractExpressionEvaluator
      extended by org.springframework.integration.handler.AbstractMessageProcessor<T>
          extended by org.springframework.integration.handler.ExpressionEvaluatingMessageProcessor<T>
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, MessageProcessor<T>

public class ExpressionEvaluatingMessageProcessor<T>
extends AbstractMessageProcessor<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

Constructor Summary
ExpressionEvaluatingMessageProcessor(org.springframework.expression.Expression expression)
          Create an ExpressionEvaluatingMessageProcessor for the given expression.
ExpressionEvaluatingMessageProcessor(org.springframework.expression.Expression expression, java.lang.Class<T> expectedType)
          Create an ExpressionEvaluatingMessageProcessor for the given expression and expected type for its evaluation result.
 
Method Summary
 T processMessage(Message<?> message)
          Processes the Message by evaluating the expression with that Message as the root object.
 
Methods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getEvaluationContext, setBeanFactory, setBeanResolver, setConversionService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionEvaluatingMessageProcessor

public ExpressionEvaluatingMessageProcessor(org.springframework.expression.Expression expression)
Create an ExpressionEvaluatingMessageProcessor for the given expression.


ExpressionEvaluatingMessageProcessor

public ExpressionEvaluatingMessageProcessor(org.springframework.expression.Expression expression,
                                            java.lang.Class<T> expectedType)
Create an ExpressionEvaluatingMessageProcessor for the given expression and expected type for its evaluation result.

Method Detail

processMessage

public T processMessage(Message<?> message)
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 interface MessageProcessor<T>
Specified by:
processMessage in class AbstractMessageProcessor<T>

Spring Integration