Class Jms11Support

All Implemented Interfaces:
JmsSupport
Direct Known Subclasses:
Jms102bSupport

public class Jms11Support extends Jms20Support
Jms11Support is a template class to provide an abstraction to to the JMS 1.1 API specification.
Since:
1.0
  • Constructor Details

  • Method Details

    • getSpecification

      public JmsSpecification getSpecification()
      Specified by:
      getSpecification in interface JmsSupport
      Overrides:
      getSpecification in class Jms20Support
      Returns:
      this implementation JmsSpecification
    • createConsumer

      public jakarta.jms.MessageConsumer createConsumer(jakarta.jms.Session session, jakarta.jms.Destination destination, String messageSelector, ConsumerType type) throws jakarta.jms.JMSException
      Creates a new JMS MessageConsumer using the given Session
      Specified by:
      createConsumer in interface JmsSupport
      Overrides:
      createConsumer in class AbstractJmsSupport
      Parameters:
      session - the Session used to create the MessageConsumer
      destination - the Destination from which Messages will be consumed
      messageSelector - a JMS selector string for filtering incoming Messages. Empty or null implies no filtering
      type - the ConsumerType to use based on the Destination type
      Returns:
      a new MessageConsumer for the given Destination
      Throws:
      jakarta.jms.JMSException - if an error occurs while creating the consumer
    • send

      public void send(jakarta.jms.MessageProducer producer, jakarta.jms.Message message, boolean persistent, int priority, long ttl, boolean topic, jakarta.jms.CompletionListener completionListener) throws jakarta.jms.JMSException
      Sends the given Message to the indicated Destination using the parametrized configurations. Because of async publishing didn't exist on JMS 1.1 or prior. This method will be blocking and sync.
      Specified by:
      send in interface JmsSupport
      Overrides:
      send in class AbstractJmsSupport
      Parameters:
      producer - the MessageProducer to use for sending the message
      message - the Message to send
      persistent - true if DeliveryMode.PERSISTENT should be used
      priority - the Message.getJMSPriority() to be set on send
      ttl - the message's lifetime (in milliseconds)
      topic - used by JmsSpecification.JMS_1_0_2b to decide whether to use the MessageProducer as TopicPublisher or a QueueSender
      Throws:
      jakarta.jms.JMSException - if an error occurs during messsage sending