public DiscoveryService( UniqueId id, ITransportConnection transportConnection, IProtocolImplementation protocol) { _log = LogManager.GetLogger <DiscoveryService>(id.ToString()); _transportConnection = transportConnection; _protocol = protocol; }
public DiscoveryRequestHandler( IAppLifecycleManager connectionTracker, IProtocolImplementation protocol, IRegistryService registryService) { _connectionTracker = connectionTracker; _protocol = protocol; _registryService = registryService; }
public OutcomingInvocationFactory( [NotNull] ITransportConnection connection, [NotNull] IProtocolImplementation protocol, [NotNull] IMarshallerProvider marshaller) { _connection = connection ?? throw new ArgumentNullException(nameof(connection)); _protocol = protocol ?? throw new ArgumentNullException(nameof(protocol)); _marshaller = marshaller ?? throw new ArgumentNullException(nameof(marshaller)); }
public AuthenticationHandler( IAppLifecycleManager connectionTracker, IProtocolImplementation protocol, IRegistryService registryService) { _messageFactory = protocol.MessageFactory; _serializer = protocol.Serializer; _connectionTracker = connectionTracker; _registryService = registryService; }
public DiscoveryRequestHandler( IAppLifecycleManager appLifecycleManager, IProtocolImplementation protocol, IRegistryService registryService, IContextLinkageManager contextLinkageManager) { _appLifecycleManager = appLifecycleManager; _protocol = protocol; _registryService = registryService; _contextLinkageManager = contextLinkageManager; }
public InvocationRequestHandler( IClientConnectionTracker clientConnectionTracker, IProtocolImplementation protocol, IRegistryService registryService) { _clientConnectionTracker = clientConnectionTracker; _protocolMessageFactory = protocol.MessageFactory; _protocolSerializer = protocol.Serializer; _registryService = registryService; _createRequestHandler = new InvocationTargetHandler <IInvocationStartRequested, IClientConnection>(CreateInvocationTarget, CreateInvocationTarget); _resolveTargetConnectionHandler = new InvocationTargetHandler <ValueTask <IClientConnection>, IClientConnection>(ResolveTargetConnectionAsync, ResolveTargetConnectionAsync); }
public InvocationRequestHandler( IAppLifecycleManager appLifecycleManager, IProtocolImplementation protocol, IRegistryService registryService) { _appLifecycleManager = appLifecycleManager; _protocolMessageFactory = protocol.MessageFactory; _protocolSerializer = protocol.Serializer; _registryService = registryService; _createRequestHandler = new InvocationTargetHandler <IInvocationStartRequested, IAppConnection>(CreateInvocationTarget, CreateInvocationTarget); _resolveTargetConnectionHandler = new InvocationTargetHandler <ValueTask <IAppConnection>, IAppConnection>(ResolveTargetConnectionAsync, ResolveTargetConnectionAsync); _stopwatch.Start(); }
public OutcomingInvocation( OutcomingInvocationDescriptor descriptor, ITransportChannel channel, IProtocolImplementation protocol, IMarshaller <TRequest> requestMarshaller, IMarshaller <TResponse> responseMarshaller) : base(channel, protocol, requestMarshaller, responseMarshaller) { _channel = channel; _log = LogManager.GetLogger <OutcomingInvocation <TRequest, TResponse> >(_channel.Id.ToString()); Info = descriptor; _protocol = protocol; }
protected Invocation( ITransportChannel channel, IProtocolImplementation protocol, IMarshaller <TRequest> requestMarshaller, IMarshaller <TResponse> responseMarshaller) { _log = LogManager.GetLogger <Invocation <TRequest, TResponse> >(channel.Id.ToString()); _channel = channel; _sender = new InvocationSendProcessor <TRequest>(channel.Id, channel.Out, protocol, requestMarshaller, _invocationState); _receiver = new InvocationReceiveProcessor <TResponse>(channel.Id, channel.In, protocol, responseMarshaller, _sender, _invocationState); _sender.RequestStream.PropagateCompletionFrom(_sender.Completion); OnStop(_sender.Stop); OnStop(_receiver.Stop); }
internal ClientOptions( string applicationId, UniqueId applicationInstanceId, ITransportClient transport, IProtocolImplementation protocol, IMarshallerProvider marshaller, IEnumerable <ProvidedServiceDefinition> services) { ApplicationId = applicationId; ApplicationInstanceId = applicationInstanceId; Transport = transport; Marshaller = marshaller; Protocol = protocol; Services = new List <ProvidedServiceDefinition>(services); ServicesDictionary = Services.ToDictionary(x => (x.Id, x.Alias), x => x); }
public InvocationRequestHandler( IAppLifecycleManager appLifecycleManager, IProtocolImplementation protocol, IRegistryService registryService, IInvocationEventProvider invocationEventProvider, IContextLinkageManager contextLinkageManager) { _appLifecycleManager = appLifecycleManager; _protocolMessageFactory = protocol.MessageFactory; _protocolSerializer = protocol.Serializer; _registryService = registryService; _invocationEventProvider = invocationEventProvider; _contextLinkageManager = contextLinkageManager; _createRequestHandler = new InvocationTargetHandler <IInvocationStartRequested, IAppConnection>(CreateInvocationTarget, CreateInvocationTarget); _resolveTargetConnectionHandler = new InvocationTargetHandler <ValueTask <IAppConnection>, IAppConnection, ITransportChannel, IContextLinkageOptions>(ResolveTargetConnectionAsync, ResolveTargetConnectionAsync); _stopwatch.Start(); }
public InvocationReceiveProcessor( UniqueId id, IReadableChannel <TransportMessageFrame> transport, IProtocolImplementation protocol, IMarshaller <TResponse> marshaller, IWritableChannel <IInvocationMessage> sender, InvocationState invocationState) { _log = LogManager.GetLogger <InvocationReceiveProcessor <TResponse> >(id.ToString()); _transport = transport; _protocol = protocol; _marshaller = marshaller; _sender = sender; _invocationState = invocationState; _incomingHandler = new InvocationMessageHandler <Nothing, Nothing>( HandleIncomingMessageHeader, HandleIncomingConfirmation, HandleIncomingCompletion); }
public IClient Create( string appId, ITransportClient transport, IProtocolImplementation protocol, IMarshallerProvider marshaller, Func <ClientOptionsBuilder, ClientOptionsBuilder> setup = default) { var builder = new ClientOptionsBuilder() .WithApplicationId(appId) .WithMarshaller(marshaller) .WithProtocol(protocol) .WithTransport(transport); if (setup != default) { builder = setup(builder); } return(new Client(builder.Build())); }
public IncomingInvocationFactory(IProtocolImplementation protocol, IMarshallerProvider marshaller) { _protocol = protocol; _marshaller = marshaller; }