Class QueuePushTransaction

java.lang.Object
com.swiftmq.swiftlet.queue.QueueTransaction
com.swiftmq.swiftlet.queue.QueuePushTransaction
All Implemented Interfaces:
Recyclable

public class QueuePushTransaction extends QueueTransaction
Transaction to push messages into a queue. It is created by a QueueSender
Author:
IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
See Also:
  • Constructor Details

    • QueuePushTransaction

      public QueuePushTransaction()
  • Method Details

    • getFlowControlDelay

      public long getFlowControlDelay()
      Returns the flow control delay, computed after the transaction has been committed.
      Returns:
      flow control delay.
    • hasReceiver

      public boolean hasReceiver(MessageImpl message)
      Checks all registered receivers and, if set, their message selectors whether this message will be received by one of them.
      Parameters:
      message -
      Returns:
      has receiver or not
    • hasSpaceLeft

      public boolean hasSpaceLeft()
      Check whether the queue has enough space to store the number of messages in the transaction
      Returns:
      true/false
    • putMessage

      public void putMessage(MessageImpl message) throws QueueException, QueueTransactionClosedException
      Put a message into the queue
      Parameters:
      message - the message
      Throws:
      QueueException - thrown by the queue
      QueueTransactionClosedException - if the transaction is closed
    • commit

      public void commit(AsyncCompletionCallback callback)
      Asynchronously commits the transaction and set the transaction state to closed
      Parameters:
      callback - async completion callback
    • rollback

      public void rollback(XidImpl globalTransactionId, boolean setRedelivered) throws QueueException, QueueTransactionClosedException
      Rolls back the transaction with the given transaction id, eventually prepared under a global transaction id. If the flag setRedelivered is set then the JMS properties for redelivery and delivery count of messages pulled within this transaction are updated.
      Specified by:
      rollback in class QueueTransaction
      Parameters:
      globalTransactionId - global transaction id
      setRedelivered - specifies JMS redelivery setting
      Throws:
      QueueException - on error
      QueueTransactionClosedException
    • rollback

      public void rollback() throws QueueException, QueueTransactionClosedException
      Rollback of the transaction.
      Specified by:
      rollback in class QueueTransaction
      Throws:
      QueueException - thrown by the queue
      QueueTransactionClosedException - if the transaction is closed
    • rollback

      public void rollback(AsyncCompletionCallback callback)
      Asynchronous rollback of the transaction.
      Parameters:
      callback - async completion callback