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,java.util.EventListener
public class QueueReceiver extends QueueTransactionHandler
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:
QueueManager.createQueueReceiver(java.lang.String, com.swiftmq.swiftlet.auth.ActiveLogin, com.swiftmq.swiftlet.queue.Selector)
-
-
Constructor Summary
Constructors Constructor Description QueueReceiver(ActiveQueue activeQueue, EntityList receiverEntityList)Creates a new QueueReceiverQueueReceiver(ActiveQueue activeQueue, EntityList receiverEntityList, Selector selector)Creates a new QueueReceiver
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the queue receiverQueuePullTransactioncreateTransaction(boolean setRedeliveredOnRollback)Creates a new QueuePullTransaction.longgetReceiverId()voidsetReceiverId(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 Detail
-
QueueReceiver
public QueueReceiver(ActiveQueue activeQueue, EntityList receiverEntityList)
Creates a new QueueReceiver- Parameters:
activeQueue- the active queue
-
QueueReceiver
public QueueReceiver(ActiveQueue activeQueue, EntityList receiverEntityList, Selector selector)
Creates a new QueueReceiver- Parameters:
activeQueue- the active queue
-
-
Method Detail
-
getReceiverId
public long getReceiverId()
-
setReceiverId
public void setReceiverId(long receiverId)
-
createTransaction
public QueuePullTransaction createTransaction(boolean setRedeliveredOnRollback) throws QueueException, QueueHandlerClosedException
Creates a new QueuePullTransaction. The flagsetRedeliveredOnRollbackspecifies 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
public void close() throws QueueException, QueueHandlerClosedExceptionClose the queue receiver- Overrides:
closein classQueueTransactionHandler- Throws:
QueueException- thrown by the queueQueueHandlerClosedException- if the browser is already closed
-
-