WebSphere Message Service Client for C/C++, Version 2.0.2 Operating Systems: AIX, Linux, Solaris, Windows

QueueBrowser

An application uses a queue browser to browse messages on a queue without removing them.

Inheritance hierarchy:
xms::PropertyContext
   |
   +----xms::QueueBrowser

Methods

Summary of methods:
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.

close – Close Queue Browser

Interface:
xmsVOID close();

Close the queue browser.

If an application tries to close a queue browser that is already closed, the call is ignored.

Parameters:
None
Returns:
Void
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getEnumeration – Get Messages

Interface:
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.

Parameters:
None
Returns:
The Iterator object.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getHandle – Get Handle

Interface:
xmsHQueueBrowser getHandle() const;

Get the handle that a C application would use to access the queue browser.

Parameters:
None
Returns:
The handle for the queue browser.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getMessageSelector – Get Message Selector

Interface:
String getMessageSelector() const;

Get the message selector for the queue browser.

Parameters:
None
Returns:
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.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getQueue – Get Queue

Interface:
Destination getQueue() const;

Get the queue associated with the queue browser.

Parameters:
None
Returns:
A Destination object representing the queue.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

isNull – Check Whether Null

Interface:
xmsBOOL isNull() const;

Determine whether the QueueBrowser object is a null object.

Parameters:
None
Returns:
  • xmsTRUE, if the QueueBrowser object is a null object.
  • xmsFALSE, if the QueueBrowser object is not a null object.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

Inherited methods


Reference topic

Terms of Use | Rate this page

Last updated: 24 May 2011

(C) Copyright IBM Corporation 2005, 2011. All Rights Reserved.