Broker 10.15 | webMethods Broker Documentation | webMethods Broker Administration Java API Programmer’s Guide | Using Queue Browsers | BrokerQueueBrowser and BrokerClientQueueBrowser
 
BrokerQueueBrowser and BrokerClientQueueBrowser
Note:BrokerQueueBrowser is an interface for queue browser methods, implementations of which allow you to browse both client queue and forwarding queue. BrokerQueueBrowser interface has two implementations, BrokerClientQueueBrowser for browsing client queues and BrokerForwardQueueBrowser for forwarding queues.
You use the BrokerQueueBrowser interface to access all the methods that you can use to browse a queue.
An application can use the BrokerQueueBrowser interface to perform the following functions on the client queue:
*Browse documents in the client's queue.
*Selectively browse documents using filters.
An application can use the BrokerQueueBrowser interface to perform the following functions on the forwarding queue for the remote Broker:
*Browse documents in the forwarding queue for the remote Broker queue.
*Selectively browse documents using filters.
All methods throw BrokerQueueBrowserException (and other exceptions) when necessary.
The BrokerQueueBrowser interface methods are listed in the following table.
Method
Description
getBrowserInfo
Get browser information of the current queue browser.
setPosition
Set the browse cursor to the specified position in the queue.
Note:
While setting the position of the browse cursor in a forwarding queue, keep in mind that the queue might also contain Broker internal events. For more information, see Forwarding Queue Browser.
setFilter
Set up a single filter for queue browse operations. If the queue browser already has one or more filters, this new filter is added to the list. If a filter is already present for a document type, the existing filter will be overwritten with the new filter. When one or more filters are set on the queue browser, a browse operation only returns documents matching those filters. Note that queue browser filters are applicable only to the browse operation and not to other queue browser operations, such as insert or delete operations.
setFilters
Set up a multiple filters for queue browse operations. If the queue browser already has one or more filters, the new filters are added to the list. If a filter is already present for a document type, the existing filter will be overwritten with the new filter. When filters are set on the queue browser, a browse operation only returns documents matching those filters. Note that queue browser filters are applicable only to the browse operation and not to other queue browser operations, such as insert or delete operations.
resetFilters
Reset the filter list on the current queue browser. The filter list on the queue browser will be emptied out.
getFilters
Get filters that are currently set for queue browse operation. The existing filters are returned in the form of BrokerFilterDescriptor objects.
browseEvents
Read one or more documents from the queue on which the queue browser is opened. This method simply returns documents from the current queue position. The number of documents being returned is not guaranteed to be the requested number of documents, even if the queue contains more than that many documents. Any number of documents up to the value of max_events may be returned.
Note:
While returning the documents, the queue browser skips all the internal events that might be queued in a forwarding queue. For more information, see Forwarding Queue Browser.
closeQueueBrowser
Close the queue browser and release the associated resources.