| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A client uses a QueueBrowser to look at messages on a queue without removing them.
The browse methods return 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 only contain the messages matching a message selector.
Messages may be arriving and expiring while the scan is done. JMS 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.
QueueSession.createBrowser(Queue), 
QueueSession.createBrowser(Queue, String), 
QueueReceiver| Method Summary | |
|  void | close()Since a provider may allocate some resources on behalf of a QueueBrowser outside the JVM, clients should close them when they are not needed. | 
|  java.util.Enumeration | getEnumeration()Get an enumeration for browsing the current queue messages in the order they would be received. | 
|  java.lang.String | getMessageSelector()Get this queue browser's message selector expression. | 
|  Queue | getQueue()Get the queue associated with this queue browser. | 
| Method Detail | 
public Queue getQueue()
               throws JMSException
public java.lang.String getMessageSelector()
                                    throws JMSException
public java.util.Enumeration getEnumeration()
                                     throws JMSException
public void close()
           throws JMSException
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||