Beispiel #1
0
        public void UnregisterNotify(Notify oldNotify)
        {
            if (oldNotify == null)
            {
                throw new ArgumentNullException("oldNotify == null");
            }

            if (this.notify == null)
            {
                return;
            }

            lock (queue)
            {
                if (oldNotify != this.notify)
                {
                    throw new ArgumentException("oldNotify != this.notify");
                }

                if (alarmSet)
                {
                    alarmSet = false;
                    AlarmManager.staticRemove(this);
                }

                this.notify = null;
                this.state  = null;
            }
        }
Beispiel #2
0
 protected override bool SessionDown()
 {
     //		Log.report( "KeepAliveSessionDown", "server", server );
     up = false;
     AlarmManager.staticRemove(this);
     return(true);
 }
Beispiel #3
0
        public bool CloseDelivery()
        {
            lock (queue)
            {
                if (queue.IsClosed())
                {
                    return(false);
                }


                if (alarmSet)
                {
                    alarmSet = false;
                    AlarmManager.staticRemove(this);
                }
                mailboxManager.Unregister(this);
                queue.Close();
            }


            fireNotify();
            return(true);
        }