Spring Integration

org.springframework.integration.handler
Class ExpressionCommandMessageProcessor

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

public class ExpressionCommandMessageProcessor
extends AbstractMessageProcessor<java.lang.Object>

A MessageProcessor implementation that expects an Expression or expressionString as the Message payload. When processing, it simply evaluates that expression.

Since:
2.0
Author:
Dave Syer, Mark Fisher

Constructor Summary
ExpressionCommandMessageProcessor()
           
ExpressionCommandMessageProcessor(org.springframework.expression.MethodFilter methodFilter)
           
 
Method Summary
 java.lang.Object processMessage(Message<?> message)
          Evaluates the Message payload expression as a command.
 
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

ExpressionCommandMessageProcessor

public ExpressionCommandMessageProcessor()

ExpressionCommandMessageProcessor

public ExpressionCommandMessageProcessor(org.springframework.expression.MethodFilter methodFilter)
Method Detail

processMessage

public java.lang.Object processMessage(Message<?> message)
Evaluates the Message payload expression as a command.

Specified by:
processMessage in interface MessageProcessor<java.lang.Object>
Specified by:
processMessage in class AbstractMessageProcessor<java.lang.Object>
Throws:
java.lang.IllegalArgumentException - if the payload is not an Exception or String

Spring Integration