Interface ISender

All Superinterfaces:
org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.Aware, IConfigurable, IConfigurationAware, INamedObject, IScopeProvider
All Known Subinterfaces:
IBlockEnabledSender<H>, ISenderWithParameters
All Known Implementing Classes:
BlockEnabledSenderBase, CollectorSenderBase, CommandSender, DelaySender, DirectQuerySender, EchoSender, FixedQuerySender, FixedResultSender, HttpSender, HttpSenderBase, IbisJavaSender, IbisLocalSender, JavascriptSender, JdbcIteratingPipeBase.MixedQuerySender, JdbcQuerySenderBase, JdbcSenderBase, JmsSender, JsonXsltSender, LdapSender, LogSender, MailSender, MailSenderBase, MessageStoreSender, MongoDbSender, MultipartHttpSender, ParallelSenders, ReconnectSenderWrapper, ReloadSender, RestSender, ResultSet2FileSender, SchedulerSender, SenderBase, SenderSeries, SenderWithParametersBase, SenderWrapper, SenderWrapperBase, SendGridSender, SendMessageJob.SendMessageJobSender, ShadowSender, StoredProcedureQuerySender, WebServiceSender, XmlJmsBrowserSender, XmlQuerySender, XmlValidatorSender, XsltSender, ZipWriterSender

@FrankDocGroup(SENDER) @ElementType(ENDPOINT) public interface ISender extends IConfigurable
The ISender is responsible for sending a message to some destination.
Gerrit van Brakel
  • Method Details

    • configure

      void configure() throws ConfigurationException
      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
    • open

      void open() throws SenderException
      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.
    • close

      void close() throws SenderException
      Stop/close the sender and deallocate resources.
    • isSynchronous

      default boolean isSynchronous()
      When true, the result of sendMessage is the reply of the request.
    • sendMessage

      SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
      Send a message to some destination (as configured in the Sender object). This method may only be called after the configure() method is called.

      The following table shows the difference between synchronous and a-synchronous senders:

      isSynchronous() returnstruefalse
      return value of sendMessage() isthe reply-messagethe messageId of the message sent
      the correlationID specified with sendMessage()may be ignoredis sent with the message
      a {link TimeOutException}may be thrown if a timeout occurs waiting for a replyshould not be expected

      Multiple objects may try to call this method at the same time, from different threads. Implementations of this method should therefore be thread-safe, or synchronized.

    • sendMessageOrThrow

      @Nonnull default Message sendMessageOrThrow(@Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException, TimeoutException
    • consumesSessionVariable

      default boolean consumesSessionVariable(String sessionKey)
      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.