Esempio n. 1
0
        public static void CreateAndSubscribePipeline(IBus bus)
        {
            var requestProcessor = new AuthenticatedHttpRequestProcessor();

            bus.Subscribe <AuthenticatedHttpRequestMessage>(requestProcessor);
            bus.Subscribe <HttpMessage.PurgeTimedOutRequests>(requestProcessor);
            bus.Publish(
                TimerMessage.Schedule.Create(
                    UpdateInterval, new PublishEnvelope(bus), new HttpMessage.PurgeTimedOutRequests()));
        }
Esempio n. 2
0
        public static void CreateAndSubscribePipeline(IBus bus)
        {
            Ensure.NotNull(bus, "bus");



            var requestProcessor = new AuthenticatedHttpRequestProcessor();

            bus.Subscribe <AuthenticatedHttpRequestMessage>(requestProcessor);
            bus.Subscribe <HttpMessage.PurgeTimedOutRequests>(requestProcessor);
        }
Esempio n. 3
0
        public static void CreateAndSubscribePipeline(IBus bus, AuthenticationProvider[] authenticationProviders)
        {
            Ensure.NotNull(authenticationProviders, "authenticationProviders");

            var requestProcessor             = new AuthenticatedHttpRequestProcessor();
            var requestAuthenticationManager = new IncomingHttpRequestAuthenticationManager(authenticationProviders);

// ReSharper disable RedundantTypeArgumentsOfMethod
            bus.Subscribe <IncomingHttpRequestMessage>(requestAuthenticationManager);
// ReSharper restore RedundantTypeArgumentsOfMethod
            bus.Subscribe <AuthenticatedHttpRequestMessage>(requestProcessor);
            bus.Subscribe <HttpMessage.PurgeTimedOutRequests>(requestProcessor);
        }