An application uses a queue browser to browse messages on a queue without removing them.
xms::PropertyContext | +----xms::QueueBrowser
Method | Description |
---|---|
close | Close the queue browser. |
getEnumeration | Get a list of the messages on the queue. |
getHandle | Get the handle that a C application would use to access the queue browser. |
getMessageSelector | Get the message selector for the queue browser. |
getQueue | Get the queue associated with the queue browser. |
isNull | Determine whether the QueueBrowser object is a null object. |
Iterator getEnumeration() const;
Get a list of the messages on the queue.
The method returns an iterator that encapsulates a list of Message objects. The order of the Message objects in the list is the same as the order in which the messages would be retrieved from the queue. The application can then use the iterator to browse each message in turn.
The iterator is updated dynamically as messages are put on the queue and removed from the queue. Each time the application calls Iterator.getNext() to browse the next message on the queue, the message returned reflects the current contents of the queue.
If an application calls this method more than once for a given queue browser, each call returns a new iterator. The application can therefore use more than one iterator to browse the messages on a queue and maintain multiple positions within the queue.
String getMessageSelector() const;
Get the message selector for the queue browser.