Class MethodInvokingSplitter

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

public class MethodInvokingSplitter extends AbstractMessageSplitter
A Message Splitter implementation that invokes the specified method on the given object. The method's return value will be split if it is a Collection or Array. If the return value is not a Collection or Array, then the single Object will be returned as the payload of a single reply Message.
Mark Fisher, Artem Bilan
  • Constructor Details

    • MethodInvokingSplitter

      public MethodInvokingSplitter(Object object, Method method)
    • MethodInvokingSplitter

      public MethodInvokingSplitter(Object object, String methodName)
    • MethodInvokingSplitter

      public MethodInvokingSplitter(Object object)
  • Method Details

    • doInit

      protected void doInit()
      doInit in class AbstractMessageSplitter
    • 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
      message - The message.
      The result of splitting the message.
    • start

      public void start()
      Specified by:
      start in interface Lifecycle
      Specified by:
      start in interface ManageableLifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface Lifecycle
      Specified by:
      stop in interface ManageableLifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface Lifecycle
      Specified by:
      isRunning in interface ManageableLifecycle