An application uses a queue browser to browse messages on a queue without removing them.
IBM.XMS.IPropertyContext System.Collections.IEnumerable | +----IBM.XMS.IQueueBrowser
.NET property | Description |
---|---|
MessageSelector | Get the message selector for the queue browser. |
Queue | Get the queue associated with the queue browser as a destination object representing the queue. |
String MessageSelector { get; }
Get the message selector for the queue browser.
The message selector is a String object encapsulating the message selector expression. If data conversion is required, this is the message selector expression after conversion. If the queue browser does not have a message selector, the method returns a null String object.
Method | Description |
---|---|
Close | Close the queue browser. |
GetEnumerator | Get a list of the messages on the queue. |
IEnumerator GetEnumerator();
Get a list of the messages on the queue.
The method returns an enumerator that encapsulates a list of Message objects. The order of the Message objects is the same as the order in which the messages would be retrieved from the queue. The application can then use the enumerator to browse each message in turn.
The enumerator is updated dynamically as messages are put on the queue and removed from the queue. Each time the application calls IEnumerator.MoveNext() to browse the next message on the queue, the message 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 enumerator. The application can therefore use more than one enumerator to browse the messages on a queue and maintain multiple positions within the queue.