Class ExpressionEvaluatingMessageListProcessor

java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.aggregator.ExpressionEvaluatingMessageListProcessor
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, MessageListProcessor

public class ExpressionEvaluatingMessageListProcessor extends AbstractExpressionEvaluator implements MessageListProcessor
A base class for aggregators that evaluates a SpEL expression with the message list as the root object within the evaluation context.
Since:
2.0
  • Constructor Details

    • ExpressionEvaluatingMessageListProcessor

      public ExpressionEvaluatingMessageListProcessor(String expression, Class<?> expectedType)
      Construct ExpressionEvaluatingMessageListProcessor for the provided SpEL expression and expected result type.
      Parameters:
      expression - a SpEL expression to evaluate in process(Collection).
      expectedType - an expected result type.
      Since:
      5.0
    • ExpressionEvaluatingMessageListProcessor

      public ExpressionEvaluatingMessageListProcessor(String expression)
      Construct ExpressionEvaluatingMessageListProcessor for the provided SpEL expression and expected result type.
      Parameters:
      expression - a SpEL expression to evaluate in process(Collection).
      Since:
      5.0
    • ExpressionEvaluatingMessageListProcessor

      public ExpressionEvaluatingMessageListProcessor(org.springframework.expression.Expression expression, Class<?> expectedType)
      Construct ExpressionEvaluatingMessageListProcessor for the provided expression and expected result type.
      Parameters:
      expression - an expression to evaluate in process(Collection).
      expectedType - an expected result type.
      Since:
      5.0
    • ExpressionEvaluatingMessageListProcessor

      public ExpressionEvaluatingMessageListProcessor(org.springframework.expression.Expression expression)
      Construct ExpressionEvaluatingMessageListProcessor for the provided expression.
      Parameters:
      expression - an expression to evaluate in process(Collection).
      Since:
      5.0
  • Method Details

    • setExpectedType

      public void setExpectedType(Class<?> expectedType)
      Set the result type expected from evaluation of the expression.
      Parameters:
      expectedType - The expected type.
    • process

      public Object process(Collection<? extends org.springframework.messaging.Message<?>> messages)
      Processes the Message by evaluating the expression with that Message as the root object. The expression evaluation result Object will be returned.
      Specified by:
      process in interface MessageListProcessor