Exemple #1
0
        // up-down: from application to link to session (to send a disposition)
        public void DisposeDelivery(Delivery delivery, bool settled, DeliveryState state)
        {
            Utils.Trace(TraceLevel.Verbose, "{0}: Dispose delivery (id={1}, settle={2}, state={3}).", this, delivery.DeliveryId, settled, state);
            if (settled && !delivery.Settled)
            {
                lock (this.syncRoot)
                {
                    if (!this.unsettledMap.Remove(delivery.DeliveryTag))
                    {
                        delivery.State = new Rejected()
                        {
                            Error = AmqpError.NotFound
                        };
                        delivery.Complete();
                        return;
                    }
                }
            }

            this.Session.DisposeDelivery(this, delivery, settled, state);

            if (delivery.Settled)
            {
                delivery.Complete();
                this.CheckFlow();
            }
        }
Exemple #2
0
        // bottom-up: from session disposition to link to application
        public void OnDisposeDelivery(Delivery delivery)
        {
            if (delivery.Settled)
            {
                lock (this.syncRoot)
                {
                    this.unsettledMap.Remove(delivery.DeliveryTag);
                }

                delivery.Complete();
                this.CheckFlow();
            }
        }
Exemple #3
0
 protected void AbortDelivery(Delivery delivery)
 {
     delivery.State = AmqpConstants.ReleasedOutcome;
     delivery.Complete();
 }
Exemple #4
0
 protected void AbortDelivery(Delivery delivery)
 {
     delivery.State = AmqpConstants.ReleasedOutcome;
     delivery.Complete();
 }
Exemple #5
0
        // bottom-up: from session disposition to link to application
        public void OnDisposeDelivery(Delivery delivery)
        {
            if (delivery.Settled)
            {
                lock (this.syncRoot)
                {
                    this.unsettledMap.Remove(delivery.DeliveryTag);
                }

                delivery.Complete();
                this.CheckFlow();
            }
        }
Exemple #6
0
        // up-down: from application to link to session (to send a disposition)
        public void DisposeDelivery(Delivery delivery, bool settled, DeliveryState state)
        {
            Utils.Trace(TraceLevel.Verbose, "{0}: Dispose delivery (id={1}, settle={2}, state={3}).", this, delivery.DeliveryId, settled, state);
            if (settled && !delivery.Settled)
            {
                lock (this.syncRoot)
                {
                    if (!this.unsettledMap.Remove(delivery.DeliveryTag))
                    {
                        delivery.State = new Rejected() { Error = AmqpError.NotFound };
                        delivery.Complete();
                        return;
                    }
                }
            }

            this.Session.DisposeDelivery(this, delivery, settled, state);

            if (delivery.Settled)
            {
                delivery.Complete();
                this.CheckFlow();
            }
        }