Class SenderSeries

All Implemented Interfaces:
ICacheEnabled<String,String>, FrankElement, HasApplicationContext, HasName, IConfigurable, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, NameAware, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle
Direct Known Subclasses:
JavascriptSender, ParallelSenders

public class SenderSeries extends AbstractSenderWrapper
Series of Senders, that are executed one after another.
Since:
4.9
Author:
Gerrit van Brakel
  • Constructor Details

    • SenderSeries

      public SenderSeries()
  • Method Details

    • isSenderConfigured

      protected boolean isSenderConfigured()
      Specified by:
      isSenderConfigured in class AbstractSenderWrapper
    • configure

      public void configure() throws ConfigurationException
      Description copied from interface: ISender
      configure() is called once at startup of the framework in the configure method of the owner of this sender. Purpose of this method is to check whether the static configuration of the sender is correct. As much as possible class-instantiating should take place in the configure() or open() method, to improve performance.
      Specified by:
      configure in interface IConfigurable
      Specified by:
      configure in interface ISender
      Overrides:
      configure in class AbstractSenderWrapper
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • start

      public void start()
      Description copied from interface: ISender
      This method will be called to start the sender. After this method is called the sendMessage method may be called. Purpose of this method is to reduce creating connections to databases etc. in the sendMessage() method.
      Specified by:
      start in interface ISender
      Specified by:
      start in interface org.springframework.context.Lifecycle
      Overrides:
      start in class AbstractSenderWrapper
    • stop

      public void stop()
      Description copied from interface: ISender
      Stop/close the sender and deallocate resources.
      Specified by:
      stop in interface ISender
      Specified by:
      stop in interface org.springframework.context.Lifecycle
      Overrides:
      stop in class AbstractSenderWrapper
    • doSendMessage

      public SenderResult doSendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
      Specified by:
      doSendMessage in class AbstractSenderWrapper
      Throws:
      SenderException
      TimeoutException
    • consumesSessionVariable

      public boolean consumesSessionVariable(String sessionKey)
      Description copied from interface: ISender
      returns true if the sender or one of its children use the named session variable. Callers can use this to determine if a message needs to be preserved.
      Specified by:
      consumesSessionVariable in interface ISender
      Specified by:
      consumesSessionVariable in interface ISenderWithParameters
      Overrides:
      consumesSessionVariable in class AbstractSenderWithParameters
    • setSender

      @Deprecated public final void setSender(ISender sender)
      Deprecated.
    • addSender

      public void addSender(ISender sender)
      one or more specifications of senders that will be executed one after another. Each sender will get the result of the preceding one as input.
    • getStatisticsKeeper

      @Nonnull protected io.micrometer.core.instrument.DistributionSummary getStatisticsKeeper(ISender sender)
    • getSenders

      protected Iterable<ISender> getSenders()
    • isSynchronous

      public boolean isSynchronous()
      Description copied from interface: ISender
      When true, the result of sendMessage is the reply of the request.
    • setSynchronous

      public void setSynchronous(boolean synchronous)