Inheritance: Performative
Exemple #1
0
            public void OnBegin(Begin begin)
            {
                lock (this.SyncRoot)
                {
                    // Can happen in pipeline mode
                    uint alreadySent = this.Session.settings.OutgoingWindow.Value - this.outgoingWindow;
                    if (alreadySent > begin.IncomingWindow.Value)
                    {
                        this.outgoingWindow = 0;
                    }
                    else
                    {
                        this.outgoingWindow = begin.IncomingWindow.Value - alreadySent;
                    }

                    this.Session.settings.OutgoingWindow = this.outgoingWindow;
                }
            }
Exemple #2
0
 Error Negotiate(Begin begin)
 {
     this.outgoingChannel.OnBegin(begin);
     this.UpdateHandleTable(begin);
     return null;
 }
Exemple #3
0
        void OnReceiveBegin(Begin begin)
        {
            StateTransition stateTransition = this.TransitState("R:BEGIN", StateTransition.ReceiveOpen);

            this.incomingChannel.OnBegin(begin);
            if (stateTransition.To == AmqpObjectState.OpenReceived)
            {
                this.outgoingChannel.OnBegin(begin);
                this.UpdateHandleTable(begin);
                this.Open();
            }
            else
            {
                Exception exception = null;
                Error error = this.Negotiate(begin);
                if (error != null)
                {
                    exception = new AmqpException(error);
                }

                this.CompleteOpen(false, exception);
                if (exception != null)
                {
                    this.SafeClose(exception);
                }
            }
        }
Exemple #4
0
 void UpdateHandleTable(Begin begin)
 {
     this.settings.HandleMax = Math.Min(this.settings.HandleMax(), begin.HandleMax());
     this.linksByLocalHandle.SetMaxHandle(this.settings.HandleMax.Value);
     this.linksByRemoteHandle.SetMaxHandle(this.settings.HandleMax.Value);
 }
Exemple #5
0
 public void OnBegin(Begin begin)
 {
     lock (this.SyncRoot)
     {
         this.nextIncomingId = begin.NextOutgoingId.Value;
     }
 }