javax.jms

Interface QueueBrowser

  • All Superinterfaces:
    AutoCloseable

    public interface QueueBrowser
    extends AutoCloseable
    A client uses a QueueBrowser object to look at messages on a queue without removing them.

    The getEnumeration method returns a java.util.Enumeration that is used to scan the queue's messages. It may be an enumeration of the entire content of a queue, or it may contain only the messages matching a message selector.

    Messages may be arriving and expiring while the scan is done. The JMS API does not require the content of an enumeration to be a static snapshot of queue content. Whether these changes are visible or not depends on the JMS provider.

    A message must not be returned by a QueueBrowser before its delivery time has been reached.

    A QueueBrowser can be created from either a Session or a QueueSession.

    Since:
    JMS 1.0
    Version:
    JMS 2.0
    See Also:
    Session.createBrowser(javax.jms.Queue), QueueSession.createBrowser(javax.jms.Queue), QueueReceiver
    • Method Detail

      • getQueue

        Queue getQueue()
                throws JMSException
        Gets the queue associated with this queue browser.
        Returns:
        the queue
        Throws:
        JMSException - if the JMS provider fails to get the queue associated with this browser due to some internal error.
      • getMessageSelector

        String getMessageSelector()
                           throws JMSException
        Gets this queue browser's message selector expression.
        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 JMS provider fails to get the message selector for this browser due to some internal error.
      • getEnumeration

        Enumeration getEnumeration()
                            throws JMSException
        Gets an enumeration for browsing the current queue messages in the order they would be received.
        Returns:
        an enumeration for browsing the messages
        Throws:
        JMSException - if the JMS provider fails to get the enumeration for this browser due to some internal error.
      • close

        void close()
            throws JMSException
        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
        Throws:
        JMSException - if the JMS provider fails to close this browser due to some internal error.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 18/08/2025 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-javaee-rf-javax/jms/QueueBrowser.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com, QueueBrowser (Java(TM) EE 7 Specification APIs)

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.