Exemplo n.º 1
0
        void OnDataReceived(FramingData data)
        {
            Uri uri = data.To;
            App app = appQueue.Lookup(uri);

            if (app == null)
            {
                // Not found
                return;
            }

            lock (ThisLock)
            {
                bool firstStart;
                app.EnsureStarted(out firstStart);

                if (firstStart)
                {
                    WasHelper.OpenListenerChannelInstance(this.protocolHandle,
                                                          app.AppPoolId, app.Instance.Id, app.Instance.Serialize());
                }

                app.EnqueueAndDispatch(data);
            }
        }
Exemplo n.º 2
0
        internal void Dispatch()
        {
            FramingData framingData = app.EndDequeue(app.BeginDequeue());

            controlCallback.Dispatch(framingData);

            UdpListenerAdapter.Dispatch(data, this);
        }
Exemplo n.º 3
0
        public void EnqueueAndDispatch(FramingData data)
        {
            // Schedule message dispatch
            RequestContext context = new RequestContext(data);

            messageQueue.EnqueueAndDispatch(context, context.OnContextDequeued, false);

            // Wait for the message to be dequeued.
            context.OnContextEnqueued();
        }
 public void Dispatch(FramingData data)
 {
     // Dispatch the message on a new thread
     ThreadPool.QueueUserWorkItem(new WaitCallback(OnDispatchMessage), data);
 }
 public void Dispatch(FramingData data)
 {
     // Dispatch the message on a new thread
     ThreadPool.QueueUserWorkItem(new WaitCallback(OnDispatchMessage), data);
 }
Exemplo n.º 6
0
 public RequestContext(FramingData data)
 {
     this.data            = data;
     this.contextDequeued = new ManualResetEvent(false);
 }
Exemplo n.º 7
0
        public void OnDataReceived(FramingData data)
        {
            ServiceHostingEnvironment.EnsureServiceAvailable(data.To.LocalPath);

            base.Dispatch(data);
        }
        public void OnDataReceived(FramingData data)
        {
            ServiceHostingEnvironment.EnsureServiceAvailable(data.To.LocalPath);

            base.Dispatch(data);
        }
Exemplo n.º 9
0
        public void EnqueueAndDispatch(FramingData data)
        {
            // Schedule message dispatch
            RequestContext context = new RequestContext(data);
            messageQueue.EnqueueAndDispatch(context, context.OnContextDequeued, false);

            // Wait for the message to be dequeued.
            context.OnContextEnqueued();
        }
Exemplo n.º 10
0
 public RequestContext(FramingData data)
 {
     this.data = data;
     this.contextDequeued = new ManualResetEvent(false);
 }
Exemplo n.º 11
0
        void OnDataReceived(FramingData data)
        {
            Uri uri = data.To;
            App app = appQueue.Lookup(uri);
            if (app == null)
            {
                // Not found
                return;
            }

            lock (ThisLock)
            {
                bool firstStart;
                app.EnsureStarted(out firstStart);

                if (firstStart)
                {
                    WasHelper.OpenListenerChannelInstance(this.protocolHandle,
                        app.AppPoolId, app.Instance.Id, app.Instance.Serialize());
                }

                app.EnqueueAndDispatch(data);
            }
        }