webMethods Admin
Version 7.1.0.0.211 082207

COM.activesw.api.client
Class BrokerClientQueueBrowser

java.lang.Object
  extended by COM.activesw.api.client.BrokerClientQueueBrowser
Direct Known Subclasses:
BrokerLockedClientQueueBrowser

public class BrokerClientQueueBrowser
extends java.lang.Object

This class provides queue browsing capabilities to view events from client queue.


Method Summary
 BrokerEvent[] browseEvents(int max_events, int msecs)
          Browse one or more events from the queue.
 void closeQueueBrowser()
          Close the current queue browser object.
 BrokerClientQueueBrowserInfo getBrowserInfo()
          Get information on the current queue browser.
 COM.activesw.api.client.BrokerFilterDescriptor[] getFilters()
          Get the current filters set on the queue browser.
 void resetFilters()
          Remove all existing filters on the queue browser.
 void setFilter(COM.activesw.api.client.BrokerFilterDescriptor filter)
          Set filter for queue browser's browse operation.
 void setFilters(COM.activesw.api.client.BrokerFilterDescriptor[] filters)
          Set filters for queue browser's browse operation.
 void setPosition(int position)
          Set the browse cursor to the specified psotion on the queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBrowserInfo

public BrokerClientQueueBrowserInfo getBrowserInfo()
                                            throws BrokerException
Get information on the current queue browser.

Returns:
BrokerQueueBrowserInfo object
Throws:
BrokerException

setPosition

public void setPosition(int position)
                 throws BrokerException
Set the browse cursor to the specified psotion on the queue.

Parameters:
position - The queue position to set
Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerClientQueueBrowserException - If the position is out of bounds or the queue is exhausted.
BrokerException

setFilter

public void setFilter(COM.activesw.api.client.BrokerFilterDescriptor filter)
               throws BrokerException
Set filter for queue browser's browse operation.

Throws:
BrokerNullParameterException - If description is null.
BrokerUnknownEventTypeException - If no events exist in the specified scope on the broker.
BrokerInvalidFilterException - If the specified filter expression is invalid.
BrokerException

setFilters

public void setFilters(COM.activesw.api.client.BrokerFilterDescriptor[] filters)
                throws BrokerException
Set filters for queue browser's browse operation.

Throws:
BrokerNullParameterException - If description is null.
BrokerUnknownEventTypeException - If no events exist in the specified scope on the broker.
BrokerInvalidFilterException - If the specified filter expression is invalid.
BrokerException

resetFilters

public void resetFilters()
                  throws BrokerException
Remove all existing filters on the queue browser.

Throws:
BrokerException

getFilters

public COM.activesw.api.client.BrokerFilterDescriptor[] getFilters()
                                                            throws BrokerException
Get the current filters set on the queue browser.

Returns:
Array of BrokerFilterDescriptor
Throws:
BrokerException

browseEvents

public BrokerEvent[] browseEvents(int max_events,
                                  int msecs)
                           throws BrokerException
Browse one or more events from the queue. Returns immediately with either events, or an error if the end of of the queue is reached. The number of events being returned is not guaranteed to be 'max_events' even if there are more than than many events in the client's queue. Any number of events up to the value of 'max_events' may be returned. In addition to the listed exceptions, any communications exception can be thrown.

Throws:
BrokerInvalidClientException - If the client has been destroyed or disconnected.
BrokerTimeoutException - If the timeout is reached before any events arrive.
BrokerException

closeQueueBrowser

public void closeQueueBrowser()
                       throws BrokerException
Close the current queue browser object.

Throws:
BrokerException

webMethods Admin
Version 7.1.0.0.211 082207

webMethods Broker is a registered trademark of webMethods, Inc.
Copyright 2005 webMethods, Inc.
All Rights Reserved.