|
SonicMQ API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface 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.
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 |
---|
int getPrefetchCount()
setPrefetchCount(int)
int getPrefetchThreshold()
setPrefetchCount(int)
void setPrefetchCount(int count) throws JMSException
Note that this is a Progress SonicMQ extention not found in the
standard QueueBrowser
interface.
count
- The number of messages to prefetch.
JMSException
- if an invalid value is set.setPrefetchThreshold(int)
,
getPrefetchCount()
void setPrefetchThreshold(int threshold) throws JMSException
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.
threshold
- The threshold value for prefetching messages.
JMSException
- if an invalid value is set.setPrefetchCount(int)
,
getPrefetchThreshold()
|
SonicMQ API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |