Class MessageSplitterServiceImp

java.lang.Object
com.adaptris.core.ServiceImp
com.adaptris.core.services.splitter.MessageSplitterServiceImp
All Implemented Interfaces:
AdaptrisComponent, ComponentLifecycle, ComponentLifecycleExtension, ConfigComment, MessageEventGenerator, Service, StateManagedComponent
Direct Known Subclasses:
AdvancedMessageSplitterService, BasicMessageSplitterService

public abstract class MessageSplitterServiceImp extends ServiceImp

Abstract base class for splitting messages based on some criteria.

  • Field Details

  • Constructor Details

    • MessageSplitterServiceImp

      public MessageSplitterServiceImp()
  • Method Details

    • doService

      public final void doService(AdaptrisMessage msg) throws ServiceException
      Description copied from interface: Service

      Apply the service to the message.

      Parameters:
      msg - the AdaptrisMessage to process
      Throws:
      ServiceException - wrapping any underlying Exceptions
      See Also:
    • handleSplitMessage

      protected abstract void handleSplitMessage(AdaptrisMessage msg, Consumer<Exception> successOrFailure) throws ServiceException
      Throws:
      ServiceException
    • waitForCompletion

      protected void waitForCompletion(com.adaptris.core.services.splitter.MessageSplitterServiceImp.SplitterCallback tasks, long expected) throws ServiceException
      Throws:
      ServiceException
    • initService

      protected void initService() throws CoreException
      Specified by:
      initService in class ServiceImp
      Throws:
      CoreException
    • closeService

      protected void closeService()
      Specified by:
      closeService in class ServiceImp
    • setSplitter

      public void setSplitter(MessageSplitter ms)

      Sets the MessageSplitter to use.

      Parameters:
      ms - the MessageSplitter to use, may not be null
    • getSplitter

      public MessageSplitter getSplitter()

      Returns the MessageSplitter to use.

      Returns:
      the MessageSplitter to use
    • getIgnoreSplitMessageFailures

      public Boolean getIgnoreSplitMessageFailures()
      Returns:
      the ignoreSplitMessageFailures
    • ignoreSplitMessageFailures

      public boolean ignoreSplitMessageFailures()
    • setIgnoreSplitMessageFailures

      public void setIgnoreSplitMessageFailures(Boolean b)
      Whether or not to ignore errors on messages that are split.
      Parameters:
      b - if true, then all split messages will be processed; failures are simply logged (default false)