Package com.swiftmq.swiftlet.queue
Class QueueBrowser
java.lang.Object
com.swiftmq.swiftlet.queue.event.QueueManagerAdapter
com.swiftmq.swiftlet.queue.QueueHandler
com.swiftmq.swiftlet.queue.QueueBrowser
- All Implemented Interfaces:
QueueManagerListener
,EventListener
A QueueBrowser is created by the QueueManager. It provides a method for
browsing queue messages outside a transaction.
- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQueueBrowser
(ActiveQueue activeQueue, Selector selector, EntityList browserEntityList) Creates a new QueueBrowser -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the queue browserGet the next available message from the queue.void
Reset the browser.void
setLastMessageIndex
(MessageIndex lastMessageIndex) Methods inherited from class com.swiftmq.swiftlet.queue.QueueHandler
getNumberQueueMessages, getQueueName, isClosed, queueStopInitiated, verifyQueueHandlerState
Methods inherited from class com.swiftmq.swiftlet.queue.event.QueueManagerAdapter
queueStarted, queueStartInitiated, queueStopped
-
Constructor Details
-
QueueBrowser
Creates a new QueueBrowser- Parameters:
activeQueue
- the active queueselector
- an optional selectorbrowserEntityList
- the browser usage entity list
-
-
Method Details
-
setLastMessageIndex
-
resetBrowser
public void resetBrowser()Reset the browser. It will start at the beginning next time a message is fetched. -
getNextMessage
Get the next available message from the queue.- Returns:
- message or null
- Throws:
QueueException
- thrown by the queueQueueHandlerClosedException
- if the handler is closed
-
close
Close the queue browser- Overrides:
close
in classQueueHandler
- Throws:
QueueException
- thrown by the queueQueueHandlerClosedException
- if the browser is already closed
-