Package com.swiftmq.swiftlet.queue
Class QueueReceiver
java.lang.Object
com.swiftmq.swiftlet.queue.event.QueueManagerAdapter
com.swiftmq.swiftlet.queue.QueueHandler
com.swiftmq.swiftlet.queue.QueueTransactionHandler
com.swiftmq.swiftlet.queue.QueueReceiver
- All Implemented Interfaces:
QueueManagerListener
,EventListener
A QueueReceiver is a QueueTransactionHandler that serves as a factory
for QueuePullTransactions. Pulling messages from the underlying queue
goes via QueuePullTransactions. QueueReceivers are created by the
QueueManager.
- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQueueReceiver
(ActiveQueue activeQueue, EntityList receiverEntityList) Creates a new QueueReceiverQueueReceiver
(ActiveQueue activeQueue, EntityList receiverEntityList, Selector selector) Creates a new QueueReceiver -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the queue receivercreateTransaction
(boolean setRedeliveredOnRollback) Creates a new QueuePullTransaction.long
void
setReceiverId
(long receiverId) 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
-
QueueReceiver
Creates a new QueueReceiver- Parameters:
activeQueue
- the active queue
-
QueueReceiver
Creates a new QueueReceiver- Parameters:
activeQueue
- the active queue
-
-
Method Details
-
getReceiverId
public long getReceiverId() -
setReceiverId
public void setReceiverId(long receiverId) -
createTransaction
public QueuePullTransaction createTransaction(boolean setRedeliveredOnRollback) throws QueueException, QueueHandlerClosedException Creates a new QueuePullTransaction. The flagsetRedeliveredOnRollback
specifies whether redelivery setting for all pulled messages should be processed or not. If true then all messages pulled whithin this transaction will be incremented in there delivery count header field and a redelivered flag will be set if the message is pulled again.- Parameters:
setRedeliveredOnRollback
- flag- Returns:
- QueuePullTransaction
- Throws:
QueueException
- thrown by the queueQueueHandlerClosedException
- if the handler is closed
-
close
Close the queue receiver- Overrides:
close
in classQueueTransactionHandler
- Throws:
QueueException
- thrown by the queueQueueHandlerClosedException
- if the browser is already closed
-