public Scheduler(IAgentQueue queue)
 {
     this._queue = queue;
 }
        /// <summary>  Constructs a MessageDispatcher for a zone</summary>
        public MessageDispatcher(ZoneImpl zone)
        {
            fRequestCache = RequestCache.GetInstance(zone.Agent);

            fZone = zone;
            fQueue = zone.fQueue;
            if (fQueue != null)
            {
                if (!fQueue.Ready)
                {
                    throw new AdkQueueException
                        (
                        "Agent Queue is not ready for agent \"" + zone.Agent.Id + "\" zone \"" +
                        zone.ZoneId + "\"",
                        fZone);
                }
                Thread thread = new Thread(new ThreadStart(this.Run));
                thread.Name = zone.Agent.Id + "@" + zone.ZoneId + ".MessageDispatcher";
                thread.Start();
            }

            fSourceId = zone.Agent.Id;
            fKeepMsg = zone.Agent.Properties.KeepMessageContent;
            fAckAckOnPull = zone.Agent.Properties.PullAckAck;

            try
            {
                fParser = SifParser.NewInstance();
            }
            catch (AdkException adke)
            {
                throw new ApplicationException(adke.ToString());
            }
        }