Class TopicSession

  • All Implemented Interfaces:
    jakarta.jms.Session, jakarta.jms.TopicSession, AutoCloseable, Runnable, SessionMBean

    public class TopicSession
    extends Session
    implements jakarta.jms.TopicSession
    Implements the jakarta.jms.TopicSession interface.
    • Constructor Detail

      • TopicSession

        TopicSession​(Connection cnx,
                     boolean transacted,
                     int acknowledgeMode,
                     RequestMultiplexer mtpx)
              throws jakarta.jms.JMSException
        Constructs a topic session.
        Parameters:
        cnx - The connection the session belongs to.
        transacted - true for a transacted session.
        acknowledgeMode - 1 (auto), 2 (client) or 3 (dups ok).
        Throws:
        jakarta.jms.JMSException - In case of an invalid acknowledge mode.
    • Method Detail

      • createPublisher

        public jakarta.jms.TopicPublisher createPublisher​(jakarta.jms.Topic topic)
                                                   throws jakarta.jms.JMSException
        API method.
        Specified by:
        createPublisher in interface jakarta.jms.TopicSession
        Throws:
        jakarta.jms.IllegalStateException - If the session is closed or if the connection is broken.
        jakarta.jms.JMSException - If the creation fails for any other reason.
      • createSubscriber

        public jakarta.jms.TopicSubscriber createSubscriber​(jakarta.jms.Topic topic,
                                                            String selector,
                                                            boolean noLocal)
                                                     throws jakarta.jms.JMSException
        API method.
        Specified by:
        createSubscriber in interface jakarta.jms.TopicSession
        Throws:
        jakarta.jms.IllegalStateException - If the session is closed or if the connection is broken.
        jakarta.jms.JMSException - If the creation fails for any other reason.
      • createSubscriber

        public jakarta.jms.TopicSubscriber createSubscriber​(jakarta.jms.Topic topic)
                                                     throws jakarta.jms.JMSException
        API method.
        Specified by:
        createSubscriber in interface jakarta.jms.TopicSession
        Throws:
        jakarta.jms.IllegalStateException - If the session is closed or if the connection is broken.
        jakarta.jms.JMSException - If the creation fails for any other reason.
      • createBrowser

        public jakarta.jms.QueueBrowser createBrowser​(jakarta.jms.Queue queue,
                                                      String selector)
                                               throws jakarta.jms.JMSException
        API method.
        Specified by:
        createBrowser in interface jakarta.jms.Session
        Overrides:
        createBrowser in class Session
        Parameters:
        queue - the queue to browse
        selector - the expression allowing to filter messages
        Returns:
        a newly created QueueBrowser object.
        Throws:
        jakarta.jms.IllegalStateException - Systematically.
        jakarta.jms.JMSException
      • createBrowser

        public jakarta.jms.QueueBrowser createBrowser​(jakarta.jms.Queue queue)
                                               throws jakarta.jms.JMSException
        API method.
        Specified by:
        createBrowser in interface jakarta.jms.Session
        Overrides:
        createBrowser in class Session
        Parameters:
        queue - the queue to browse
        Returns:
        a newly created QueueBrowser object.
        Throws:
        jakarta.jms.IllegalStateException - Systematically.
        jakarta.jms.JMSException
      • createQueue

        public jakarta.jms.Queue createQueue​(String queueName)
                                      throws jakarta.jms.JMSException
        API method.
        Specified by:
        createQueue in interface jakarta.jms.Session
        Overrides:
        createQueue in class Session
        Parameters:
        queueName - the name of this queue.
        Returns:
        a queue with the given name.
        Throws:
        jakarta.jms.IllegalStateException - Systematically.
        jakarta.jms.JMSException - If the topic creation failed.
        See Also:
        Queue
      • createTemporaryQueue

        public jakarta.jms.TemporaryQueue createTemporaryQueue()
                                                        throws jakarta.jms.JMSException
        API method.
        Specified by:
        createTemporaryQueue in interface jakarta.jms.Session
        Overrides:
        createTemporaryQueue in class Session
        Returns:
        a temporary queue identity.
        Throws:
        jakarta.jms.IllegalStateException - Systematically.
        jakarta.jms.JMSException - If the request fails for any other reason.
        See Also:
        TemporaryQueue