예제 #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()));
        }
예제 #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);
        }
예제 #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);
        }