Class JmsSender

All Implemented Interfaces:
HasPhysicalDestination, IConfigurable, IConfigurationAware, INamedObject, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, IXAEnabled, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class JmsSender extends JMSFacade implements ISenderWithParameters
This class sends messages with JMS.
Gerrit van Brakel
All parameters present are set as message-properties.
Specific parameters
SoapAction Automatically filled from attribute soapAction
  • Field Details

  • Constructor Details

    • JmsSender

      public JmsSender()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Configures the sender
      Specified by:
      configure in interface IConfigurable
      Specified by:
      configure in interface ISender
      configure in class JMSFacade
    • open

      public void open() throws SenderException
      Starts the sender
      Specified by:
      open in interface ISender
      open in class JMSFacade
    • addParameter

      public void addParameter(IParameter p)
      Specified by:
      addParameter in interface IWithParameters
    • getParameterList

      public ParameterList getParameterList()
      Specified by:
      getParameterList in interface IWithParameters
    • 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
    • sendMessage

      public Message sendMessage(Message message, PipeLineSession pipeLineSession, String soapHeader) throws SenderException, TimeoutException
    • getDestination

      public jakarta.jms.Destination getDestination(PipeLineSession session, ParameterValueList pvl) throws JmsException, NamingException, jakarta.jms.JMSException
    • toString

      public String toString()
      toString in class JMSFacade
    • setDestinationParam

      public void setDestinationParam(String string)
      Parameter that is used, if specified and not empty, to determine the destination. Overrides the destination attribute
    • setSynchronous

      public void setSynchronous(boolean synchronous)
      If true, the sender operates in RR mode: A reply is expected, either on the queue specified in replyToName, or on a dynamically generated temporary queue
      Default value
    • setReplyToName

      public void setReplyToName(String replyTo)
      Name of the queue the reply is expected on. This value is sent in the JMSReplyTo-header with the message.
      Default value
      a dynamically generated temporary destination
    • setLinkMethod

      public void setLinkMethod(JmsSender.LinkMethod method)
      (Only used when synchronous=true and replyToName is set). Indicates whether the server uses the correlationId from the pipeline, the correlationId from the message or the messageId in the correlationId field of the reply. This requires the sender to have set the correlationId at the time of sending.
      Default value
    • setReplyTimeout

      public void setReplyTimeout(int i)
      (Only for synchronous=true). Maximum time in ms to wait for a reply. 0 means no timeout.
      Default value
    • setMessageType

      public void setMessageType(String string)
      Value of the JMSType field
      Default value
      not set by application
    • setDeliveryMode

      public void setDeliveryMode(JMSFacade.DeliveryMode deliveryMode)
      Controls mode that messages are sent with
      Default value
      not set by application
    • setPriority

      public void setPriority(int i)
      Sets the priority that is used to deliver the message. Ranges from 0 to 9. Defaults to -1, meaning not set. Effectively the default priority is set by JMS to 4
      Default value
    • setSoap

      public void setSoap(boolean b)
      If true, messages sent are put in a SOAP envelope
      Default value
    • setEncodingStyleURI

      public void setEncodingStyleURI(String string)
      SOAP encoding style URI
    • setServiceNamespaceURI

      public void setServiceNamespaceURI(String string)
      SOAP service namespace URI
    • setSoapAction

      public void setSoapAction(String string)
      SOAPAction string sent as message property
    • setSoapHeaderParam

      public void setSoapHeaderParam(String string)
      Name of parameter containing SOAP header
      Default value
    • setReplySoapHeaderSessionKey

      public void setReplySoapHeaderSessionKey(String string)
      session key to store SOAP header of reply
      Default value
    • setResponseHeadersToSessionKeys

      public void setResponseHeadersToSessionKeys(String responseHeaders)
      A list of JMS headers of the response to add to the PipeLineSession
    • getReplyToName

      public String getReplyToName()
    • getDeliveryMode

      public JMSFacade.DeliveryMode getDeliveryMode()
    • getMessageType

      public String getMessageType()
    • getPriority

      public int getPriority()
    • isSynchronous

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

      public int getReplyTimeout()
    • getReplySoapHeaderSessionKey

      public String getReplySoapHeaderSessionKey()
    • isSoap

      public boolean isSoap()
    • getEncodingStyleURI

      public String getEncodingStyleURI()
    • getServiceNamespaceURI

      public String getServiceNamespaceURI()
    • getSoapAction

      public String getSoapAction()
    • getSoapHeaderParam

      public String getSoapHeaderParam()
    • getLinkMethod

      public JmsSender.LinkMethod getLinkMethod()
    • getDestinationParam

      public String getDestinationParam()
    • getResponseHeadersList

      public List<String> getResponseHeadersList()