Class ActiveMQQueueBrowser

    • Method Detail

      • close

        public void close()
                   throws JMSException
        Description copied from interface: QueueBrowser
        Closes the QueueBrowser.

        Since a provider may allocate some resources on behalf of a QueueBrowser outside the Java virtual machine, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.

        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface QueueBrowser
        Throws:
        JMSException - if the Jakarta Messaging provider fails to close this browser due to some internal error.
      • getEnumeration

        public Enumeration getEnumeration()
                                   throws JMSException
        Description copied from interface: QueueBrowser
        Gets an enumeration for browsing the current queue messages in the order they would be received.
        Specified by:
        getEnumeration in interface QueueBrowser
        Returns:
        an enumeration for browsing the messages
        Throws:
        JMSException - if the Jakarta Messaging provider fails to get the enumeration for this browser due to some internal error.
      • getMessageSelector

        public String getMessageSelector()
                                  throws JMSException
        Description copied from interface: QueueBrowser
        Gets this queue browser's message selector expression.
        Specified by:
        getMessageSelector in interface QueueBrowser
        Returns:
        this queue browser's message selector, or null if no message selector exists for the message consumer (that is, if the message selector was not set or was set to null or the empty string)
        Throws:
        JMSException - if the Jakarta Messaging provider fails to get the message selector for this browser due to some internal error.
      • getQueue

        public Queue getQueue()
                       throws JMSException
        Description copied from interface: QueueBrowser
        Gets the queue associated with this queue browser.
        Specified by:
        getQueue in interface QueueBrowser
        Returns:
        the queue
        Throws:
        JMSException - if the Jakarta Messaging provider fails to get the queue associated with this browser due to some internal error.