|
||||||||||
| 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. |
Enumeration |
getEnumeration()
Get an enumeration for browsing the current queue messages in the order they would be received. |
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
JMSException - if JMS fails to get the
queue associated with this Browser
due to some JMS error.
public String getMessageSelector()
throws JMSException
JMSException - if JMS fails to get the
message selector for this browser
due to some JMS error.
public Enumeration getEnumeration()
throws JMSException
JMSException - if JMS fails to get the
enumeration for this browser
due to some JMS error.
public void close()
throws JMSException
JMSException - if a JMS fails to close this
Browser due to some JMS error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||