Class SenderWrapperBase

All Implemented Interfaces:
ICacheEnabled<String,String>, AdapterAware, IConfigurable, IConfigurationAware, INamedObject, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
ReconnectSenderWrapper, SenderSeries, SenderWrapper

public abstract class SenderWrapperBase extends SenderWithParametersBase implements AdapterAware, ICacheEnabled<String,String>
Baseclass for Wrappers for senders, that allows to get input from a session variable, and to store output in a session variable.
Gerrit van Brakel
  • Field Details

  • Constructor Details

    • SenderWrapperBase

      public SenderWrapperBase()
  • Method Details

    • 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
      configure in class SenderWithParametersBase
    • open

      public void open() throws SenderException
      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:
      open in interface ISender
      open in class SenderBase
    • close

      public void close() throws SenderException
      Description copied from interface: ISender
      Stop/close the sender and deallocate resources.
      Specified by:
      close in interface ISender
      close in class SenderBase
    • isSenderConfigured

      protected abstract boolean isSenderConfigured()
    • doSendMessage

      public abstract SenderResult doSendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
    • sendMessage

      public SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
      Description copied from interface: ISender
      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:

      ISender.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.

      Specified by:
      sendMessage in interface ISender
    • getLogPrefix

      public String getLogPrefix()
      Description copied from class: SenderBase
      Returns the true name of the class and not XsltPipe$$EnhancerBySpringCGLIB$$563e6b5d. ClassUtils.nameOf(Object) makes sure the original class will be used.
      getLogPrefix in class SenderBase
      className + name of the ISender
    • setGetInputFromSessionKey

      public void setGetInputFromSessionKey(String string)
      If set, input is taken from this session key, instead of regular input
    • setGetInputFromFixedValue

      public void setGetInputFromFixedValue(String string)
      If set, this fixed value is taken as input, instead of regular input
    • setPreserveInput

      public void setPreserveInput(boolean preserveInput)
      If set true, the input of a pipe is restored before processing the next one
      Default value
    • setStoreResultInSessionKey

      public void setStoreResultInSessionKey(String string)
      If set, the result is stored under this session key
    • setStoreInputInSessionKey

      public void setStoreInputInSessionKey(String string)
      If set, the input is stored under this session key
    • getGetInputFromSessionKey

      public String getGetInputFromSessionKey()
    • getGetInputFromFixedValue

      public String getGetInputFromFixedValue()
    • getStoreResultInSessionKey

      public String getStoreResultInSessionKey()
    • getStoreInputInSessionKey

      public String getStoreInputInSessionKey()
    • isPreserveInput

      public boolean isPreserveInput()
    • setAdapter

      public void setAdapter(Adapter adapter)
      Specified by:
      setAdapter in interface AdapterAware
    • setConfigurationMetrics

      public void setConfigurationMetrics(MetricsInitializer configurationMetrics)
    • setSenderWrapperProcessor

      public void setSenderWrapperProcessor(SenderWrapperProcessor senderWrapperProcessor)
    • getCache

      public ICache<String,String> getCache()
      Specified by:
      getCache in interface ICacheEnabled<String,String>
    • setCache

      public void setCache(ICache<String,String> cache)
      Description copied from interface: ICacheEnabled
      optional cache definition
      Specified by:
      setCache in interface ICacheEnabled<String,String>