public ConnectionManager( ConnectionFactory connectionBuilder, INetworkingTrace trace) { this.connectionFactory = connectionBuilder; this.trace = trace; }
public GatewayConnectionListener( IServiceProvider serviceProvider, IOptions <ConnectionOptions> connectionOptions, IConnectionListenerFactory listenerFactory, MessageFactory messageFactory, OverloadDetector overloadDetector, Gateway gateway, INetworkingTrace trace, ILocalSiloDetails localSiloDetails, IOptions <MultiClusterOptions> multiClusterOptions, IOptions <EndpointOptions> endpointOptions, MessageCenter messageCenter, ISiloStatusOracle siloStatusOracle) : base(serviceProvider, listenerFactory, connectionOptions, trace) { this.messageFactory = messageFactory; this.overloadDetector = overloadDetector; this.gateway = gateway; this.trace = trace; this.localSiloDetails = localSiloDetails; this.multiClusterOptions = multiClusterOptions; this.messageCenter = messageCenter; this.siloStatusOracle = siloStatusOracle; this.endpointOptions = endpointOptions.Value; }
public GatewayConnectionListener( IServiceProvider serviceProvider, IOptions <ConnectionOptions> connectionOptions, IOptions <SiloConnectionOptions> siloConnectionOptions, MessageFactory messageFactory, OverloadDetector overloadDetector, Gateway gateway, INetworkingTrace trace, ILocalSiloDetails localSiloDetails, IOptions <MultiClusterOptions> multiClusterOptions, IOptions <EndpointOptions> endpointOptions, MessageCenter messageCenter, ConnectionManager connectionManager) : base(serviceProvider, serviceProvider.GetRequiredServiceByKey <object, IConnectionListenerFactory>(ServicesKey), connectionOptions, connectionManager, trace) { this.siloConnectionOptions = siloConnectionOptions.Value; this.messageFactory = messageFactory; this.overloadDetector = overloadDetector; this.gateway = gateway; this.trace = trace; this.localSiloDetails = localSiloDetails; this.multiClusterOptions = multiClusterOptions; this.messageCenter = messageCenter; this.endpointOptions = endpointOptions.Value; }
public GatewayInboundConnection( ConnectionContext connection, ConnectionDelegate middleware, IServiceProvider serviceProvider, Gateway gateway, OverloadDetector overloadDetector, MessageFactory messageFactory, INetworkingTrace trace, ILocalSiloDetails siloDetails, IOptions <MultiClusterOptions> multiClusterOptions, ConnectionOptions connectionOptions, MessageCenter messageCenter, ILocalSiloDetails localSiloDetails) : base(connection, middleware, messageFactory, serviceProvider, trace) { this.connectionOptions = connectionOptions; this.gateway = gateway; this.overloadDetector = overloadDetector; this.siloDetails = siloDetails; this.messageCenter = messageCenter; this.multiClusterOptions = multiClusterOptions.Value; this.loadSheddingCounter = CounterStatistic.FindOrCreate(StatisticNames.GATEWAY_LOAD_SHEDDING); this.myAddress = localSiloDetails.SiloAddress; this.MessageReceivedCounter = CounterStatistic.FindOrCreate(StatisticNames.GATEWAY_RECEIVED); this.MessageSentCounter = CounterStatistic.FindOrCreate(StatisticNames.GATEWAY_SENT); }
public ConnectionManager( IOptions <ConnectionOptions> connectionOptions, ConnectionFactory connectionBuilder, INetworkingTrace trace) { this.connectionOptions = connectionOptions.Value; this.connectionFactory = connectionBuilder; this.trace = trace; }
protected ConnectionListener( IServiceProvider serviceProvider, IConnectionListenerFactory listenerFactory, IOptions <ConnectionOptions> connectionOptions, INetworkingTrace trace) { this.ServiceProvider = serviceProvider; this.listenerFactory = listenerFactory; this.ConnectionOptions = connectionOptions.Value; this.trace = trace; }
public ClientOutboundConnectionFactory( IServiceProvider serviceProvider, IOptions <ConnectionOptions> connectionOptions, IConnectionFactory connectionFactory, MessageFactory messageFactory, INetworkingTrace trace) : base(connectionFactory, serviceProvider, connectionOptions) { this.serviceProvider = serviceProvider; this.messageFactory = messageFactory; this.trace = trace; }
public ClientOutboundConnectionFactory( IServiceProvider serviceProvider, IOptions <ConnectionOptions> connectionOptions, IOptions <ClientConnectionOptions> clientConnectionOptions, MessageFactory messageFactory, INetworkingTrace trace) : base(serviceProvider.GetRequiredServiceByKey <object, IConnectionFactory>(ServicesKey), serviceProvider, connectionOptions) { this.serviceProvider = serviceProvider; this.clientConnectionOptions = clientConnectionOptions.Value; this.messageFactory = messageFactory; this.trace = trace; }
public SiloConnectionFactory( IServiceProvider serviceProvider, IOptions <ConnectionOptions> connectionOptions, IConnectionFactory connectionFactory, MessageFactory messageFactory, INetworkingTrace trace, ILocalSiloDetails localSiloDetails) : base(connectionFactory, serviceProvider, connectionOptions) { this.serviceProvider = serviceProvider; this.messageFactory = messageFactory; this.trace = trace; this.localSiloDetails = localSiloDetails; }
public SiloConnectionFactory( IServiceProvider serviceProvider, IOptions <ConnectionOptions> connectionOptions, IOptions <SiloConnectionOptions> siloConnectionOptions, MessageFactory messageFactory, INetworkingTrace trace, ILocalSiloDetails localSiloDetails) : base(serviceProvider.GetRequiredServiceByKey <object, IConnectionFactory>(ServicesKey), serviceProvider, connectionOptions) { this.serviceProvider = serviceProvider; this.siloConnectionOptions = siloConnectionOptions.Value; this.messageFactory = messageFactory; this.trace = trace; this.localSiloDetails = localSiloDetails; }
protected Connection( ConnectionContext connection, ConnectionDelegate middleware, IServiceProvider serviceProvider, INetworkingTrace trace) { this.Context = connection ?? throw new ArgumentNullException(nameof(connection)); this.middleware = middleware; this.serviceProvider = serviceProvider; this.Log = trace; this.outgoingMessages = Channel.CreateUnbounded <Message>(OutgoingMessageChannelOptions); this.outgoingMessageWriter = this.outgoingMessages.Writer; // Set the connection on the connection context so that it can be retrieved by the middleware. this.Context.Features.Set <Connection>(this); this.IsValid = true; }
public ClientOutboundConnection( ConnectionContext connection, ConnectionDelegate middleware, MessageFactory messageFactory, IServiceProvider serviceProvider, ClientMessageCenter messageCenter, GatewayManager gatewayManager, INetworkingTrace trace) : base(connection, middleware, serviceProvider, trace) { this.messageFactory = messageFactory; this.messageCenter = messageCenter; this.gatewayManager = gatewayManager; if (connection.RemoteEndPoint is IPEndPoint ipEndpoint) { this.TargetSilo = SiloAddress.New(ipEndpoint, 0); } }
public SiloConnection( ConnectionContext connection, ConnectionDelegate middleware, IServiceProvider serviceProvider, INetworkingTrace trace, MessageCenter messageCenter, MessageFactory messageFactory, ILocalSiloDetails localSiloDetails, ISiloStatusOracle siloStatusOracle, ConnectionManager connectionManager) : base(connection, middleware, serviceProvider, trace) { this.messageCenter = messageCenter; this.messageFactory = messageFactory; this.siloStatusOracle = siloStatusOracle; this.connectionManager = connectionManager; this.myAddress = localSiloDetails.SiloAddress; }
public ClientOutboundConnection( SiloAddress remoteSiloAddress, ConnectionContext connection, ConnectionDelegate middleware, MessageFactory messageFactory, IServiceProvider serviceProvider, ClientMessageCenter messageCenter, INetworkingTrace trace, ConnectionManager connectionManager, ConnectionOptions connectionOptions) : base(connection, middleware, serviceProvider, trace) { this.messageFactory = messageFactory; this.messageCenter = messageCenter; this.connectionManager = connectionManager; this.connectionOptions = connectionOptions; this.RemoteSiloAddress = remoteSiloAddress ?? throw new ArgumentNullException(nameof(remoteSiloAddress)); }
public SiloConnectionListener( IServiceProvider serviceProvider, IOptions <ConnectionOptions> connectionOptions, IConnectionListenerFactory listenerFactory, MessageCenter messageCenter, MessageFactory messageFactory, INetworkingTrace trace, IOptions <EndpointOptions> endpointOptions, ILocalSiloDetails localSiloDetails, ConnectionManager connectionManager) : base(serviceProvider, listenerFactory, connectionOptions, connectionManager, trace) { this.messageCenter = messageCenter; this.messageFactory = messageFactory; this.trace = trace; this.localSiloDetails = localSiloDetails; this.connectionManager = connectionManager; this.endpointOptions = endpointOptions.Value; }
public SiloConnection( SiloAddress remoteSiloAddress, ConnectionContext connection, ConnectionDelegate middleware, IServiceProvider serviceProvider, INetworkingTrace trace, MessageCenter messageCenter, MessageFactory messageFactory, ILocalSiloDetails localSiloDetails, ConnectionManager connectionManager, ConnectionOptions connectionOptions) : base(connection, middleware, messageFactory, serviceProvider, trace) { this.messageCenter = messageCenter; this.connectionManager = connectionManager; this.connectionOptions = connectionOptions; this.LocalSiloAddress = localSiloDetails.SiloAddress; this.RemoteSiloAddress = remoteSiloAddress; }
public SiloConnectionListener( IServiceProvider serviceProvider, IOptions <ConnectionOptions> connectionOptions, IOptions <SiloConnectionOptions> siloConnectionOptions, MessageCenter messageCenter, MessageFactory messageFactory, INetworkingTrace trace, IOptions <EndpointOptions> endpointOptions, ILocalSiloDetails localSiloDetails, ConnectionManager connectionManager) : base(serviceProvider, serviceProvider.GetRequiredServiceByKey <object, IConnectionListenerFactory>(ServicesKey), connectionOptions, connectionManager, trace) { this.siloConnectionOptions = siloConnectionOptions.Value; this.messageCenter = messageCenter; this.messageFactory = messageFactory; this.trace = trace; this.localSiloDetails = localSiloDetails; this.connectionManager = connectionManager; this.endpointOptions = endpointOptions.Value; }
protected Connection( ConnectionContext connection, ConnectionDelegate middleware, MessageFactory messageFactory, IServiceProvider serviceProvider, INetworkingTrace trace) { this.Context = connection ?? throw new ArgumentNullException(nameof(connection)); this.middleware = middleware ?? throw new ArgumentNullException(nameof(middleware)); this.MessageFactory = messageFactory ?? throw new ArgumentNullException(nameof(messageFactory)); this.serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); this.Log = trace ?? throw new ArgumentNullException(nameof(trace)); this.outgoingMessages = Channel.CreateUnbounded <Message>(OutgoingMessageChannelOptions); this.outgoingMessageWriter = this.outgoingMessages.Writer; // Set the connection on the connection context so that it can be retrieved by the middleware. this.Context.Features.Set <Connection>(this); this.RemoteEndPoint = NormalizeEndpoint(this.Context.RemoteEndPoint); this.LocalEndPoint = NormalizeEndpoint(this.Context.LocalEndPoint); this.IsValid = true; }