Ejemplo n.º 1
0
 public HandlerService(
     ILogger <IHandlerRepository> logger,
     IHandlerRepository handlerRepository,
     IApiHandlerRequestModelValidator handlerModelValidator,
     IBOLHandlerMapper bolhandlerMapper,
     IDALHandlerMapper dalhandlerMapper,
     IBOLAirTransportMapper bolAirTransportMapper,
     IDALAirTransportMapper dalAirTransportMapper,
     IBOLHandlerPipelineStepMapper bolHandlerPipelineStepMapper,
     IDALHandlerPipelineStepMapper dalHandlerPipelineStepMapper,
     IBOLOtherTransportMapper bolOtherTransportMapper,
     IDALOtherTransportMapper dalOtherTransportMapper
     )
     : base(logger,
            handlerRepository,
            handlerModelValidator,
            bolhandlerMapper,
            dalhandlerMapper,
            bolAirTransportMapper,
            dalAirTransportMapper,
            bolHandlerPipelineStepMapper,
            dalHandlerPipelineStepMapper,
            bolOtherTransportMapper,
            dalOtherTransportMapper)
 {
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates the handler repository.
 /// </summary>
 /// <returns></returns>
 private ServiceProcessorConfigurator CreateHandlerRepository()
 {
     var handlerRepositoryFactory = HandlerRepositoryFactory.GetFactory<ServiceHandlerRepositoryFactory>();
     var assemblies = _serviceProcessorConfig.HandlersAssemblies.Cast<HandlerAssemblyConfig>().Select(ha => ha.Assembly);
     _handlerRepository = handlerRepositoryFactory.Create(assemblies);
     return this;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates the handler repository.
 /// </summary>
 /// <returns></returns>
 private ListenerConfigurator CreateHandlerRepository()
 {
     var handlerRepositoryFactory = HandlerRepositoryFactory.GetFactory<ListenersHandlerRepositoryFactory>();
     var assemblies = _listenerConfig.HandlersAssemblies.Cast<HandlerAssemblyConfig>().Select(ha => ha.Assembly).ToList();
     _handlerRepository = handlerRepositoryFactory.Create(assemblies);
     return this;
 }
Ejemplo n.º 4
0
 public AbstractHandlerService(
     ILogger logger,
     IHandlerRepository handlerRepository,
     IApiHandlerRequestModelValidator handlerModelValidator,
     IBOLHandlerMapper bolHandlerMapper,
     IDALHandlerMapper dalHandlerMapper,
     IBOLAirTransportMapper bolAirTransportMapper,
     IDALAirTransportMapper dalAirTransportMapper,
     IBOLHandlerPipelineStepMapper bolHandlerPipelineStepMapper,
     IDALHandlerPipelineStepMapper dalHandlerPipelineStepMapper,
     IBOLOtherTransportMapper bolOtherTransportMapper,
     IDALOtherTransportMapper dalOtherTransportMapper)
     : base()
 {
     this.handlerRepository            = handlerRepository;
     this.handlerModelValidator        = handlerModelValidator;
     this.bolHandlerMapper             = bolHandlerMapper;
     this.dalHandlerMapper             = dalHandlerMapper;
     this.bolAirTransportMapper        = bolAirTransportMapper;
     this.dalAirTransportMapper        = dalAirTransportMapper;
     this.bolHandlerPipelineStepMapper = bolHandlerPipelineStepMapper;
     this.dalHandlerPipelineStepMapper = dalHandlerPipelineStepMapper;
     this.bolOtherTransportMapper      = bolOtherTransportMapper;
     this.dalOtherTransportMapper      = dalOtherTransportMapper;
     this.logger = logger;
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Creates the handler repository.
        /// </summary>
        /// <returns></returns>
        private ListenerConfigurator CreateHandlerRepository()
        {
            var handlerRepositoryFactory = HandlerRepositoryFactory.GetFactory <ListenersHandlerRepositoryFactory>();
            var assemblies = _listenerConfig.HandlersAssemblies.Cast <HandlerAssemblyConfig>().Select(ha => ha.Assembly).ToList();

            _handlerRepository = handlerRepositoryFactory.Create(assemblies);
            return(this);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Creates the handler repository.
        /// </summary>
        /// <returns></returns>
        private ServiceProcessorConfigurator CreateHandlerRepository()
        {
            var handlerRepositoryFactory = HandlerRepositoryFactory.GetFactory <ServiceHandlerRepositoryFactory>();
            var assemblies = _serviceProcessorConfig.HandlersAssemblies.Cast <HandlerAssemblyConfig>().Select(ha => ha.Assembly);

            _handlerRepository = handlerRepositoryFactory.Create(assemblies);
            return(this);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ControlProcessor"/> class.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="outputGateway">The output gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 /// <param name="messageBuilder">The message builder.</param>
 /// <param name="reinjectionEngine">The reinjection engine.</param>
 internal ControlProcessor(Identification identification,
                           IInputGateway <IControlMessage, MessageHeader> inputGateway,
                           IOutputGateway <IControlMessage> outputGateway,
                           IHandlerRepository handlerRepository, IMessageBuilder messageBuilder, IReinjectionEngine reinjectionEngine)
     : base(identification, inputGateway, handlerRepository, messageBuilder, reinjectionEngine)
 {
     OutputGateway = outputGateway;
 }
Ejemplo n.º 8
0
 internal Listener(IInputGateway <TMessage, MessageHeader> inputGateway,
                   IHandlerRepository handlerRepository)
 {
     _inputGateway            = inputGateway;
     _inputGateway.OnMessage += MessageReceived;
     _handlerRepository       = handlerRepository;
     ConfigureStateMachine();
 }
Ejemplo n.º 9
0
 /// <summary>
 ///     Creates the service processor.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 /// <param name="messageBuilder">The message builder.</param>
 /// <returns></returns>
 public static IProcessor CreateServiceProcessor(Identification identification,
                                                 IInputGateway <IMessage, MessageHeader> inputGateway,
                                                 IHandlerRepository handlerRepository,
                                                 IMessageBuilder messageBuilder)
 {
     return(new ServiceProcessor(identification,
                                 inputGateway,
                                 handlerRepository,
                                 messageBuilder, ReinjectionEngineFactory.CreateDefaultEngine(inputGateway))
     {
         Logger = LoggerManager.Instance
     });
 }
Ejemplo n.º 10
0
        /// <summary>
        ///     Creates the router control processor.
        /// </summary>
        /// <param name="identification">The identification.</param>
        /// <param name="inputGateway">The input gateway.</param>
        /// <param name="handlerRepository">The handler repository.</param>
        /// <param name="subscriptorsHelper">The subscriptors helper.</param>
        /// <returns></returns>
        public static IController CreateRouterControlProcessor(Identification identification,
                                                               IInputGateway<IControlMessage, MessageHeader> inputGateway,
                                                               IHandlerRepository handlerRepository,
                                                               ISubscriptorsHelper subscriptorsHelper)
        {
            IMessageBuilder defaultObjectBuilder = MessageBuilderFactory.CreateDefaultBuilder();

            return new RouterControlProcessor(identification, inputGateway, handlerRepository, subscriptorsHelper,
                                              defaultObjectBuilder)
                {
                    Logger = LoggerManager.Instance
                };
        }
Ejemplo n.º 11
0
        /// <summary>
        ///     Creates the router control processor.
        /// </summary>
        /// <param name="identification">The identification.</param>
        /// <param name="inputGateway">The input gateway.</param>
        /// <param name="handlerRepository">The handler repository.</param>
        /// <param name="subscriptorsHelper">The subscriptors helper.</param>
        /// <returns></returns>
        public static IController CreateRouterControlProcessor(Identification identification,
                                                               IInputGateway <IControlMessage, MessageHeader> inputGateway,
                                                               IHandlerRepository handlerRepository,
                                                               ISubscriptorsHelper subscriptorsHelper)
        {
            IMessageBuilder defaultObjectBuilder = MessageBuilderFactory.CreateDefaultBuilder();

            return(new RouterControlProcessor(identification, inputGateway, handlerRepository, subscriptorsHelper,
                                              defaultObjectBuilder)
            {
                Logger = LoggerManager.Instance
            });
        }
Ejemplo n.º 12
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="RouterControlProcessor" /> class.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 /// <param name="subscriptonsHelper">The subscriptors helper.</param>
 /// <param name="messageBuilder">The message builder.</param>
 internal RouterControlProcessor(Identification identification,
                                 IInputGateway <IControlMessage, MessageHeader> inputGateway,
                                 IHandlerRepository handlerRepository,
                                 ISubscriptorsHelper subscriptonsHelper,
                                 IMessageBuilder messageBuilder)
 {
     ConfigureStateMachine();
     _identification                = identification;
     _inputGateway                  = inputGateway;
     _inputGateway.OnMessage       += MessageReceived;
     _handlerRepository             = handlerRepository;
     _subscriptonsHelper            = subscriptonsHelper;
     _subscriptonsHelper.Controller = this;
     _messageBuilder                = messageBuilder;
 }
Ejemplo n.º 13
0
 /// <summary>
 ///     Creates the control processor.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="outputGateway">The output gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 /// <returns></returns>
 public static IController CreateControlProcessor(Identification identification,
                                                  IInputGateway <IControlMessage, MessageHeader> inputGateway,
                                                  IOutputGateway <IControlMessage> outputGateway,
                                                  IHandlerRepository handlerRepository)
 {
     return(new ControlProcessor(identification,
                                 inputGateway,
                                 outputGateway,
                                 handlerRepository,
                                 MessageBuilderFactory.CreateDefaultBuilder(),
                                 ReinjectionEngineFactory.CreateDefaultEngine(inputGateway))
     {
         Logger = LoggerManager.Instance
     });
 }
Ejemplo n.º 14
0
 /// <summary>
 ///     Creates the control processor.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="outputGateway">The output gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 /// <returns></returns>
 public static IController CreateControlProcessor(Identification identification,
                                                  IInputGateway<IControlMessage, MessageHeader> inputGateway,
                                                  IOutputGateway<IControlMessage> outputGateway,
                                                  IHandlerRepository handlerRepository)
 {
     return new ControlProcessor(identification,
                                 inputGateway,
                                 outputGateway,
                                 handlerRepository,
                                 MessageBuilderFactory.CreateDefaultBuilder(),
                                 ReinjectionEngineFactory.CreateDefaultEngine(inputGateway))
         {
             Logger = LoggerManager.Instance
         };
 }
Ejemplo n.º 15
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="RouterControlProcessor" /> class.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 /// <param name="subscriptonsHelper">The subscriptors helper.</param>
 /// <param name="messageBuilder">The message builder.</param>
 internal RouterControlProcessor(Identification identification,
                                 IInputGateway<IControlMessage, MessageHeader> inputGateway,
                                 IHandlerRepository handlerRepository,
                                 ISubscriptorsHelper subscriptonsHelper,
                                 IMessageBuilder messageBuilder)
 {
     ConfigureStateMachine();
     _identification = identification;
     _inputGateway = inputGateway;
     _inputGateway.OnMessage += MessageReceived;
     _handlerRepository = handlerRepository;
     _subscriptonsHelper = subscriptonsHelper;
     _subscriptonsHelper.Controller = this;
     _messageBuilder = messageBuilder;
 }
Ejemplo n.º 16
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="Agent{TMessage}" /> class.
        /// </summary>
        /// <param name="identification">The identification.</param>
        /// <param name="inputGateway">The input gateway.</param>
        /// <param name="handlerRepository">The handler repository.</param>
        /// <param name="messageBuilder">The message builder.</param>
        /// <param name="reinjectionEngine">The reinjection engine.</param>
        protected Agent(Identification identification,
                        IInputGateway <TMessage, MessageHeader> inputGateway,
                        IHandlerRepository handlerRepository, IMessageBuilder messageBuilder,
                        IReinjectionEngine reinjectionEngine)
        {
            JoinedBusInfo = BusInfo.Create();

            ConfigureStateMachine();

            _identification          = identification;
            _messageBuilder          = messageBuilder;
            _reinjectionEngine       = reinjectionEngine;
            _inputGateway            = inputGateway;
            _inputGateway.OnMessage += MessageReceived;
            _handlerRepository       = handlerRepository;
        }
        /// <summary>
        /// Loads the handlers.
        /// </summary>
        /// <returns></returns>
        private ControlProcessorConfigurator LoadHandlers()
        {
            var handlerRepositoryFactory = HandlerRepositoryFactory.GetFactory <ControlHandlerRepositoryFactory>();

            var list = (from HandlerAssemblyConfig handlersAssembly in _HermEsbServiceConfig.ControlProcessor.HandlersAssemblies
                        select handlersAssembly.Assembly).ToList();

            var coreAssembly = string.Format("{0}.dll", handlerRepositoryFactory.GetType().Assembly.GetName().Name);

            if (!list.Contains(coreAssembly))
            {
                list.Add(coreAssembly);
            }

            _handlerRepository = handlerRepositoryFactory.Create(list);

            return(this);
        }
Ejemplo n.º 18
0
 public SignalREventHub()
 {
     try
     {
         if (ContainerRegistry.DefaultContainer == null)
         {
             throw new Exception("You have not set the default container.  ContainerRegistry.DefaultContainer");
         }
         var container = ContainerRegistry.DefaultContainer;
         this._handlerRepository = container.GetInstance <IHandlerRepository>();
         this._messagingContext  = container.GetInstance <IMessagingContext>();
         this._groupRegistrar    = container.GetInstance <ISignalRGroupRegistrar>();
         this._groupJoinService  = container.GetInstance <IGroupJoinService>();
         this._groupLeaveService = container.GetInstance <IGroupLeaveService>();
     }
     catch (Exception ex)
     {
         OnExceptionOccurred(new SignalRExceptionEventArgs(this.Context.User, ex, new SignalRConnectionContext(this.Context)));
         throw;
     }
 }
Ejemplo n.º 19
0
        public HandlerService(
            ILogger <IHandlerService> logger,
            MediatR.IMediator mediator,
            IHandlerRepository handlerRepository,
            IApiHandlerServerRequestModelValidator handlerModelValidator,
            IDALHandlerMapper dalHandlerMapper,
            IDALAirTransportMapper dalAirTransportMapper,
            IDALHandlerPipelineStepMapper dalHandlerPipelineStepMapper,
            IDALOtherTransportMapper dalOtherTransportMapper)
            : base()
        {
            this.HandlerRepository            = handlerRepository;
            this.HandlerModelValidator        = handlerModelValidator;
            this.DalHandlerMapper             = dalHandlerMapper;
            this.DalAirTransportMapper        = dalAirTransportMapper;
            this.DalHandlerPipelineStepMapper = dalHandlerPipelineStepMapper;
            this.DalOtherTransportMapper      = dalOtherTransportMapper;
            this.logger = logger;

            this.mediator = mediator;
        }
 public PatientController(IHandlerRepository handler)
 {
     this.handler = handler;
 }
Ejemplo n.º 21
0
 /// <summary>
 ///     Creates the service processor.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 /// <param name="messageBuilder">The message builder.</param>
 /// <returns></returns>
 public static IProcessor CreateServiceProcessor(Identification identification,
                                                 IInputGateway<IMessage, MessageHeader> inputGateway,
                                                 IHandlerRepository handlerRepository,
                                                 IMessageBuilder messageBuilder)
 {
     return new ServiceProcessor(identification,
                                 inputGateway,
                                 handlerRepository,
                                 messageBuilder, ReinjectionEngineFactory.CreateDefaultEngine(inputGateway))
         {
             Logger = LoggerManager.Instance
         };
 }
 public HandlerResolverContributor(IHandlerRepository repository)
 {
     _handlers = repository;
 }
Ejemplo n.º 23
0
 public HandlerController(IPublisher publisher, IHandlerRepository handler)
 {
     this.publisher = publisher;
     this.Handler   = handler;
 }
Ejemplo n.º 24
0
 public WadlHandler(IDependencyResolver resolver, IUriResolver uriRepository, IHandlerRepository handlerRepository)
 {
     _resolver          = resolver;
     _uriRepository     = uriRepository;
     _handlerRepository = handlerRepository;
 }
 public HandlerResolverContributor(IDependencyResolver resolver, IHandlerRepository repository)
 {
   _resolver = resolver;
   _handlers = repository;
 }
Ejemplo n.º 26
0
 public PathSegmentAsParameterUriDecorator(ICommunicationContext context, IHandlerRepository handlers)
 {
     _context  = context;
     _handlers = handlers;
 }
Ejemplo n.º 27
0
 public HandlersController(IMapper mapper, IHandlerRepository repository)
 {
     _mapper     = mapper;
     _repository = repository;
 }
 public HandlerMetaModelHandler(IHandlerRepository repository)
 {
     _repository = repository;
 }
Ejemplo n.º 29
0
        /// <summary>
        ///     Loads the handlers.
        /// </summary>
        /// <returns></returns>
        private RouterControlConfigurator LoadHandlers()
        {
            IHandlerRepositoryFactory handlerRepositoryFactory =
                HandlerRepositoryFactory.GetFactory<ControlHandlerRepositoryFactory>();

            List<string> list =
                (from HandlerAssemblyConfig handlersAssembly in
                     _hermEsbConfig.RouterControlProcessor.HandlersAssemblies
                 select handlersAssembly.Assembly).ToList();

            string coreAssembly = string.Format("{0}.dll", handlerRepositoryFactory.GetType().Assembly.GetName().Name);
            if (!list.Contains(coreAssembly))
            {
                list.Add(coreAssembly);
            }

            _handlerRepository = handlerRepositoryFactory.Create(list);

            return this;
        }
 public ApiHandlerServerRequestModelValidator(IHandlerRepository handlerRepository)
 {
     this.HandlerRepository = handlerRepository;
 }
 public HandlerMetaModelHandler(IHandlerRepository repository)
 {
     _repository = repository;
 }
 public PatientAPIController()
 {
     handler = KernelInjection.GetService<IHandlerRepository>();
 }
 public AbstractApiHandlerRequestModelValidator(IHandlerRepository handlerRepository)
 {
     this.handlerRepository = handlerRepository;
 }
Ejemplo n.º 34
0
 public HandlerResolverContributor(IDependencyResolver resolver, IHandlerRepository repository)
 {
     _resolver = resolver;
     _handlers = repository;
 }
Ejemplo n.º 35
0
 public WadlHandler(IDependencyResolver resolver, IUriResolver uriRepository, IHandlerRepository handlerRepository)
 {
     this.resolver = resolver;
     this.uriRepository = uriRepository;
     this.handlerRepository = handlerRepository;
 }
 public PathSegmentAsParameterUriDecorator(ICommunicationContext context, IHandlerRepository handlers)
 {
     this.context = context;
     this.handlers = handlers;
 }
Ejemplo n.º 37
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AgentFake"/> class.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 public AgentFake(Identification identification, IInputGateway <IMessage, MessageHeader> inputGateway, IHandlerRepository handlerRepository)
     : base(identification, inputGateway, handlerRepository, MessageBuilderFactory.CreateDefaultBuilder(), ReinjectionEngineFactory.CreateDefaultEngine(inputGateway))
 {
 }
Ejemplo n.º 38
0
 public WadlHandler(IDependencyResolver resolver, IUriResolver uriRepository, IHandlerRepository handlerRepository)
 {
     _resolver = resolver;
     _uriRepository = uriRepository;
     _handlerRepository = handlerRepository;
 }
Ejemplo n.º 39
0
 public ApiHandlerRequestModelValidator(IHandlerRepository handlerRepository)
     : base(handlerRepository)
 {
 }
 public HandlerQueue(ISubscriber subscriber, IHandlerRepository handler)
 {
     this.subscriber = subscriber;
     Handler         = handler;
 }
 public HandlerMetaModelHandler(IHandlerRepository handlerRepository)
 {
     this.handlerRepository = handlerRepository;
 }
 protected override void SetUp()
 {
     base.SetUp();
     HandlerRepository = new HandlerRepository();
     Handler           = new HandlerMetaModelHandler(HandlerRepository);
 }
Ejemplo n.º 43
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProcessor"/> class.
 /// </summary>
 /// <param name="identification">The identification.</param>
 /// <param name="inputGateway">The input gateway.</param>
 /// <param name="handlerRepository">The handler repository.</param>
 /// <param name="messageBuilder">The message builder.</param>
 /// <param name="reinjectionEngine">The reinjection engine.</param>
 internal ServiceProcessor(Identification identification,
                           IInputGateway <IMessage, MessageHeader> inputGateway,
                           IHandlerRepository handlerRepository, IMessageBuilder messageBuilder, IReinjectionEngine reinjectionEngine)
     : base(identification, inputGateway, handlerRepository, messageBuilder, reinjectionEngine)
 {
 }
Ejemplo n.º 44
0
        /// <summary>
        /// Loads the handlers.
        /// </summary>
        /// <returns></returns>
        private ControlProcessorConfigurator LoadHandlers()
        {
            var handlerRepositoryFactory = HandlerRepositoryFactory.GetFactory<ControlHandlerRepositoryFactory>();

            var list = (from HandlerAssemblyConfig handlersAssembly in _HermEsbServiceConfig.ControlProcessor.HandlersAssemblies
                        select handlersAssembly.Assembly).ToList();

            var coreAssembly = string.Format("{0}.dll", handlerRepositoryFactory.GetType().Assembly.GetName().Name);
            if (!list.Contains(coreAssembly))
            {
                list.Add(coreAssembly);
            }

            _handlerRepository = handlerRepositoryFactory.Create(list);

            return this;
        }
Ejemplo n.º 45
0
        /// <summary>
        /// Creates the specified input gateway.
        /// </summary>
        /// <typeparam name="TMessage">The type of the message.</typeparam>
        /// <param name="inputGateway">The input gateway.</param>
        /// <param name="handlerRepository">The handler repository.</param>
        /// <returns></returns>
        public static Listener <TMessage> Create <TMessage>(IInputGateway <TMessage, MessageHeader> inputGateway, IHandlerRepository handlerRepository) where TMessage : IMessage
        {
            var listener = new Listener <TMessage>(inputGateway, handlerRepository);

            listener.Logger = LoggerManager.Instance;
            return(listener);
        }