SonicMQ API

progress.message.jclient
Interface QueueBrowser

All Superinterfaces:
QueueBrowser

public interface QueueBrowser
extends QueueBrowser

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

The browse methods return a java.util.Enumeration that is used to scan the queue's messages. It may be an enumeration of the entire content of a queue or it may only contain the messages matching a message selector.

Messages may be arriving and expiring while the scan is done. JMS does not require the content of an enumeration to be a static snapshot of queue content. Whether these changes are visible or not depends on the JMS provider.

Version:
1.0 6-Jul-1999
Author:
Giovanni Boschi, May Hsu
See Also:
QueueBrowser

Method Summary
 int getPrefetchCount()
          Get the prefetch count for the QueueBrowser.
 int getPrefetchThreshold()
          Get the prefetch threshold for the QueueBrowser.
 void setPrefetchCount(int count)
          Set the prefetch count for the QueueBrowser.
 void setPrefetchThreshold(int threshold)
          Set the prefetch threshold for the QueueBrowser.
 
Methods inherited from interface javax.jms.QueueBrowser
close, getEnumeration, getMessageSelector, getQueue
 

Method Detail

getPrefetchCount

int getPrefetchCount()
Get the prefetch count for the QueueBrowser.

Returns:
The number of messages to prefetch.
See Also:
setPrefetchCount(int)

getPrefetchThreshold

int getPrefetchThreshold()
Get the prefetch threshold for the QueueBrowser. When the number of messages waiting to be processed by the QueueBrowser falls to, or below, this number, a new batch of messages will be fetched.

Returns:
The threshold value for prefetching messages.
See Also:
setPrefetchCount(int)

setPrefetchCount

void setPrefetchCount(int count)
                      throws JMSException
Set the prefetch count for the QueueBrowser. When this value is greater than one, the broker will be able to send multiple messages as part of a single QueueBrowser request. This can improve performance.

Note that this is a Progress SonicMQ extention not found in the standard QueueBrowser interface.

Parameters:
count - The number of messages to prefetch.
Throws:
JMSException - if an invalid value is set.
See Also:
setPrefetchThreshold(int), getPrefetchCount()

setPrefetchThreshold

void setPrefetchThreshold(int threshold)
                          throws JMSException
Set the prefetch threshold for the QueueBrowser. When the number of messages waiting to be processed by the QueueBrowser falls to, or below, this number, a new batch of messages will be fetched. This number cannot exceed the prefetch count.

Setting this to a value greater than zero allows the QueueBrowser to always have messages available for processing locally without waiting for a broker interaction. This improves performance.

For example, a threshold value of two and a prefetch count of five will cause the QueueBrowser to fetch batches of five messages from the broker whenever the number of messages locally waiting for processing drops below two.

Note that this is a Progress SonicMQ extention not found in the standard QueueBrowser interface.

Parameters:
threshold - The threshold value for prefetching messages.
Throws:
JMSException - if an invalid value is set.
See Also:
setPrefetchCount(int), getPrefetchThreshold()

SonicMQ API

Copyright © 1999-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 5-August-2011.