Class DefaultMessageSplitter

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

public class DefaultMessageSplitter extends AbstractMessageSplitter
The default Message Splitter implementation. Returns individual Messages after receiving an array or Collection. If a value is provided for the 'delimiters' property, then String payloads will be tokenized based on those delimiters.
Author:
Mark Fisher
  • Constructor Details

    • DefaultMessageSplitter

      public DefaultMessageSplitter()
  • Method Details

    • setDelimiters

      public void setDelimiters(String delimiters)
      Set delimiters to use for tokenizing String values. The default is null indicating that no tokenization should occur. If delimiters are provided, they will be applied to any String payload.
      Parameters:
      delimiters - The delimiters.
    • splitMessage

      protected final Object splitMessage(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.