/// <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); }
/// <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; }
internal Listener(IInputGateway <TMessage, MessageHeader> inputGateway, IHandlerRepository handlerRepository) { _inputGateway = inputGateway; _inputGateway.OnMessage += MessageReceived; _handlerRepository = handlerRepository; ConfigureStateMachine(); }
/// <summary> /// Creates the input. /// </summary> /// <returns></returns> private ListenerConfigurator CreateInput() { var uri = new Uri(_listenerConfig.Input.Uri); _input = AgentGatewayFactory.CreateInputGateway<IMessage>(uri, _listenerConfig.Input.Transport, _listenerConfig.NumberOfParallelTasks, _listenerConfig.MaxReijections); return this; }
private RouterProcessorConfigurator LoadHelpers() { var uri = new Uri(_hermEsbConfig.RouterProcessor.Input.Uri); _input = RouterGatewayFactory.CreateInputGateway(uri, _hermEsbConfig.RouterProcessor.Input.Transport, _hermEsbConfig.RouterProcessor.NumberOfParallelTasks, _hermEsbConfig.RouterProcessor.MaxReijections); return this; }
/// <summary> /// Creates the router processor. /// </summary> /// <param name="identification">The identification.</param> /// <param name="inputGateway">The input gateway.</param> /// <param name="routerOutputHelper">The router output helper.</param> /// <returns></returns> public static IProcessor CreateRouterProcessor(Identification identification, IInputGateway<byte[], RouterHeader> inputGateway, IRouterOutputHelper routerOutputHelper) { return new RouterProcessor(identification, inputGateway, routerOutputHelper) { Logger = LoggerManager.Instance }; }
/// <summary> /// Creates the router processor. /// </summary> /// <param name="identification">The identification.</param> /// <param name="inputGateway">The input gateway.</param> /// <param name="routerOutputHelper">The router output helper.</param> /// <returns></returns> public static IProcessor CreateRouterProcessor(Identification identification, IInputGateway <byte[], RouterHeader> inputGateway, IRouterOutputHelper routerOutputHelper) { return(new RouterProcessor(identification, inputGateway, routerOutputHelper) { Logger = LoggerManager.Instance }); }
/// <summary> /// Creates the input. /// </summary> /// <returns></returns> private ListenerConfigurator CreateInput() { var uri = new Uri(_listenerConfig.Input.Uri); _input = AgentGatewayFactory.CreateInputGateway <IMessage>(uri, _listenerConfig.Input.Transport, _listenerConfig.NumberOfParallelTasks, _listenerConfig.MaxReijections); return(this); }
private RouterProcessorConfigurator LoadHelpers() { var uri = new Uri(_hermEsbConfig.RouterProcessor.Input.Uri); _input = RouterGatewayFactory.CreateInputGateway(uri, _hermEsbConfig.RouterProcessor.Input.Transport, _hermEsbConfig.RouterProcessor.NumberOfParallelTasks, _hermEsbConfig.RouterProcessor.MaxReijections); return(this); }
/// <summary> /// Initializes a new instance of the <see cref="RouterProcessor" /> class. /// </summary> /// <param name="identification">The identification.</param> /// <param name="inputGateway">The message receiver.</param> /// <param name="routerOutputHelper">The bus sender helper.</param> internal RouterProcessor(Identification identification, IInputGateway <byte[], RouterHeader> inputGateway, IRouterOutputHelper routerOutputHelper) { JoinedBusInfo = BusInfo.Create(); ConfigureStateMachine(); _inputGateway = inputGateway; _identification = identification; _routerOutputHelper = routerOutputHelper; _inputGateway.OnMessage += MessageReceived; _stateMachine.ChangeState(ProcessorStatus.Configured); _serializer = new JsonDataContractSerializer(); }
/// <summary> /// Creates the input. /// </summary> /// <returns></returns> private RouterControlConfigurator CreateInput() { var uri = new Uri(_hermEsbConfig.RouterControlProcessor.Input.Uri); _input = AgentGatewayFactory.CreateInputGateway<IControlMessage>(uri, _hermEsbConfig.RouterControlProcessor .Input.Transport, _hermEsbConfig.RouterControlProcessor .NumberOfParallelTasks, _hermEsbConfig.RouterControlProcessor .MaxReijections); return this; }
/// <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 }); }
/// <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 }); }
/// <summary> /// Initializes a new instance of the <see cref="RouterProcessor" /> class. /// </summary> /// <param name="identification">The identification.</param> /// <param name="inputGateway">The message receiver.</param> /// <param name="routerOutputHelper">The bus sender helper.</param> internal RouterProcessor(Identification identification, IInputGateway<byte[], RouterHeader> inputGateway, IRouterOutputHelper routerOutputHelper) { JoinedBusInfo = BusInfo.Create(); ConfigureStateMachine(); _inputGateway = inputGateway; _identification = identification; _routerOutputHelper = routerOutputHelper; _inputGateway.OnMessage += MessageReceived; _stateMachine.ChangeState(ProcessorStatus.Configured); _serializer = new JsonDataContractSerializer(); }
/// <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 }; }
/// <summary> /// Creates the input. /// </summary> /// <returns></returns> private RouterControlConfigurator CreateInput() { var uri = new Uri(_hermEsbConfig.RouterControlProcessor.Input.Uri); _input = AgentGatewayFactory.CreateInputGateway <IControlMessage>(uri, _hermEsbConfig.RouterControlProcessor .Input.Transport, _hermEsbConfig.RouterControlProcessor .NumberOfParallelTasks, _hermEsbConfig.RouterControlProcessor .MaxReijections); return(this); }
/// <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; }
/// <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 }; }
/// <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 }); }
/// <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; }
/// <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> /// Creates the direct engine. /// </summary> /// <typeparam name="TMessage">The type of the message.</typeparam> /// <param name="inputGateway">The input gateway.</param> /// <returns></returns> public static IReinjectionEngine CreateDefaultEngine <TMessage>(IInputGateway <TMessage, MessageHeader> inputGateway) { return(new DirectReinjectionEngine <TMessage>(inputGateway)); }
/// <summary> /// Initializes a new instance of the <see cref="DirectReinjectionEngine{TMessage}" /> class. /// </summary> /// <param name="inputGateway">The input gateway.</param> public DirectReinjectionEngine(IInputGateway <TMessage, MessageHeader> inputGateway) { _inputGateway = inputGateway; InitializeStateMachine(); }
/// <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 }; }
/// <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) { }
/// <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)) { }