35.3. Methods

The following methods are defined in the interface javax.jms.QueueBrowser.

close

public void close()

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.

THROWS:

JMSException if the JMS provider fails to close this browser due to some internal error

getEnumeration

public java.util.Enumeration getEnumeration()

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 ...

Get Java™ Message Service API Tutorial and Reference: Messaging for the J2EE™ Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.