Class ExpressionEvaluatingSplitter

All Implemented Interfaces:
org.reactivestreams.Subscriber<org.springframework.messaging.Message<?>>, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle, org.springframework.core.Ordered, ExpressionCapable, Orderable, MessageProducer, DiscardingMessageHandler, HeaderPropagationAware, IntegrationPattern, NamedComponent, IntegrationManagement, ManageableLifecycle, TrackableComponent, org.springframework.messaging.MessageHandler, reactor.core.CoreSubscriber<org.springframework.messaging.Message<?>>

public class ExpressionEvaluatingSplitter
extends AbstractMessageSplitter
A Message Splitter implementation that evaluates the specified SpEL expression. The result of evaluation will typically be a Collection or Array. If the result is not a Collection or Array, then the single Object will be returned as the payload of a single reply Message.
Since:
2.0
  • Constructor Details

  • Method Details

    • doInit

      protected void doInit()
      Overrides:
      doInit in class AbstractMessageSplitter
    • splitMessage

      protected final java.lang.Object splitMessage​(org.springframework.messaging.Message<?> message)
      Description copied from class: AbstractMessageSplitter
      Subclasses must override this method to split the received Message. The return value may be a Collection or Array. The individual elements may be Messages, but it is not necessary. If the elements are not Messages, each will be provided as the payload of a Message. It is also acceptable to return a single Object or Message. In that case, a single reply Message will be produced.
      Specified by:
      splitMessage in class AbstractMessageSplitter
      Parameters:
      message - The message.
      Returns:
      The result of splitting the message.
    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
      Specified by:
      start in interface ManageableLifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
      Specified by:
      stop in interface ManageableLifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
      Specified by:
      isRunning in interface ManageableLifecycle