GetQueue() private method

private GetQueue ( string endpointName ) : BlockingQueue
endpointName string
return BlockingQueue
Ejemplo n.º 1
0
        protected Endpoint(JabberGateway gateway, EndpointSettings settings, Session session)
        {
            Gateway = gateway;
            Settings = settings;
            Session = session;
            Queue = Gateway.GetQueue(settings.Name);

            Endpoint oldEndpoint = null;
            if (gateway.Endpoints.TryGetValue(settings.Name, out oldEndpoint) && (oldEndpoint != null))
                oldEndpoint.Dispose();

            gateway.Endpoints[settings.Name] = this;

            QueueTaskFuture = Program.Scheduler.Start(QueueTask(), TaskExecutionPolicy.RunAsBackgroundTask);
        }
Ejemplo n.º 2
0
        protected Endpoint(JabberGateway gateway, EndpointSettings settings, Session session)
        {
            Gateway  = gateway;
            Settings = settings;
            Session  = session;
            Queue    = Gateway.GetQueue(settings.Name);

            Endpoint oldEndpoint = null;

            if (gateway.Endpoints.TryGetValue(settings.Name, out oldEndpoint) && (oldEndpoint != null))
            {
                oldEndpoint.Dispose();
            }

            gateway.Endpoints[settings.Name] = this;

            QueueTaskFuture = Program.Scheduler.Start(QueueTask(), TaskExecutionPolicy.RunAsBackgroundTask);
        }
        private void TestEndpoint_Click(object sender, EventArgs e)
        {
            var name = List.SelectedItem as string;

            Script.GetQueue(name).Enqueue("Testing");
        }