TIBCO EMS .NET API 10.2
TIBCO EMS .NET API 10.2
TIBCO.EMS.QueueBrowser Class Reference

Enumerate the messages in a queue without consuming them More...

Inherits IEnumerator.

Public Member Functions

bool MoveNext ()
 Advance the browser enumeration to the next message More...
 
void Reset ()
 Reset the browser to the location just before the first message More...
 
void Close ()
 Closes the QueueBrowser and reclaim resources More...
 
IEnumerator GetEnumerator ()
 Get an enumerator for browsing the current queue messages in the order they would be received More...
 

Properties

Object Current [get]
 Get the current message in the browser More...
 
string MessageSelector [get]
 Get the message selector associated with this QueueBrowser More...
 
TIBCO.EMS.Queue Queue [get]
 Get the queue associated with this queue browser More...
 

Detailed Description

Enumerate the messages in a queue without consuming them

A browser is a dynamic enumerator of the queue (not a static snapshot). The contents of the queue on the server change as messages arrive and consumers remove them. Meanwhile, a client can call the MoveNext method to advance the browser enumeration to the next message in the queue.

The browser can enumerate messages in a queue, or a subset filtered by a message selector.

Sessions serve as factories for queue browsers; see Session or QueueSession.

Note that the application must close the QueueBrowser to free server resources.

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

Member Function Documentation

void TIBCO.EMS.QueueBrowser.Close ( )
inline

Closes the QueueBrowser and reclaim resources

IEnumerator TIBCO.EMS.QueueBrowser.GetEnumerator ( )
inline

Get an enumerator for browsing the current queue messages in the order they would be received

Returns
The browser object, which is itself the enumerator.
bool TIBCO.EMS.QueueBrowser.MoveNext ( )
inline

Advance the browser enumeration to the next message

A browser is a dynamic enumerator of the queue (not a static snapshot). The queue is at the server, and its contents change as message arrive and consumers remove them. Meanwhile, while the browser is at the client. This method asks the server for the next message after Current, that is, the next message that is still in the queue.

After creating a browser, programs must first call this method on the enumerator to move to the first message.

Returns
True if another message exists; the Current property subsequently presents the next message. Returns false otherwise.
void TIBCO.EMS.QueueBrowser.Reset ( )
inline

Reset the browser to the location just before the first message

Exceptions
InvalidOperationExceptionIf queue browser is closed or has other failure.

Property Documentation

Object TIBCO.EMS.QueueBrowser.Current
get

Get the current message in the browser

This property presents the current message in the browser enumeration, but accessing the property does not consume that message.

The MoveNext method advances the current message.

This property can be queried repeatly and the same message will be returned.

Returns
The current message.
Exceptions
InvalidOperationExceptionIf queue browser is closed or failure to get the current message, or message is null.
string TIBCO.EMS.QueueBrowser.MessageSelector
get

Get the message selector associated with this QueueBrowser

The browser message selector expression filters the messages that the browser presents.

Returns
The associated message selector, null if none is associated.
TIBCO.EMS.Queue TIBCO.EMS.QueueBrowser.Queue
get

Get the queue associated with this queue browser

Returns
The queue.

Copyright © Cloud Software Group, Inc. All rights reserved.