Class 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:
    QueueSender.createTransaction()
    • Constructor Detail

      • QueuePushTransaction

        public QueuePushTransaction()
    • Method Detail

      • 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
      • 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​(AsyncCompletionCallback callback)
        Asynchronous rollback of the transaction.
        Parameters:
        callback - async completion callback