Class ExpressionEvaluatingMessageSource<T>

Type Parameters:
T - the expected payload type.
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, ExpressionCapable, MessageSource<T>, IntegrationPattern, NamedComponent, IntegrationInboundManagement, IntegrationManagement

public class ExpressionEvaluatingMessageSource<T> extends AbstractMessageSource<T> implements ExpressionCapable
Since:
2.0
  • Constructor Details

    • ExpressionEvaluatingMessageSource

      public ExpressionEvaluatingMessageSource(org.springframework.expression.Expression expression, Class<T> expectedType)
  • Method Details

    • getComponentType

      public String getComponentType()
      Specified by:
      getComponentType in interface NamedComponent
    • doReceive

      public T doReceive()
      Description copied from class: AbstractMessageSource
      Subclasses must implement this method. Typically the returned value will be the payload of type T, but the returned value may also be a Message instance whose payload is of type T; also can be AbstractIntegrationMessageBuilder which is used for additional headers population.
      Specified by:
      doReceive in class AbstractMessageSource<T>
      Returns:
      The value returned.
    • getExpression

      public org.springframework.expression.Expression getExpression()
      Description copied from interface: ExpressionCapable
      Return the primary SpEL expression if this component is expression-based.
      Specified by:
      getExpression in interface ExpressionCapable
      Returns:
      the expression as a String.