QueueBrowser

 


public interface QueueBrowser

WebSphere MQ class: MQQueueBrowser



java.lang.Object
   |
   +----com.ibm.mq.jms.MQQueueBrowser

A client uses a QueueBrowser to look at messages on a queue without removing them.

Note:
The WebSphere MQ class MQQueueEnumeration is used to hold the browse cursor.

See also: QueueReceiver

 

Methods

close
public void close() throws JMSException

Because a provider can allocate some resources outside the JVM on behalf of a QueueBrowser, clients must close them when they are not needed. You cannot rely on garbage collection to reclaim these resources eventually, because this might not occur soon enough.

Throws:
JMSException if a JMS fails to close this browser because of a JMS error.

getEnumeration
public java.util.Enumeration getEnumeration() throws JMSException

Get an enumeration for browsing the current queue messages in the order that they are received.

Returns:
An enumeration for browsing the messages.

Throws:
JMSException if JMS fails to get the enumeration for this browser because of a JMS error.

Note:
If the browser is created for a nonexistent queue, this is not detected until the first call to getEnumeration.

getMessageSelector
public java.lang.String getMessageSelector() throws JMSException

Get this queue browser's message selector expression.

Returns:
This queue browser's message selector.

Throws:
JMSException if JMS fails to get the message selector for this browser because of a JMS error.

getQueue
public Queue getQueue() throws JMSException

Get the queue associated with this queue browser.

Returns:
The queue.

Throws:
JMSException if JMS fails to get the queue associated with this browser because of a JMS error.

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.