private IRequestSender StartRequestSender(Client.Configuration configuration) { var self = SelfAs <IResponseChannelConsumer>(); var requestSender = ChildActorFor <IRequestSender>(() => new RequestSenderProbeActor(configuration, self, _testId)); return(requestSender); }
public ClientConsumerWorkerActor(Client.Configuration configuration) { _testId = configuration.HasTestInfo ? TestIdGenerator.IncrementAndGet().ToString() : EmptyTestId; _requestSender = StartRequestSender(configuration); _parser = null; }
public RequestSenderProbeActor(Client.Configuration configuration, IResponseChannelConsumer consumer, string testId) { _channel = ClientConsumerCommons.ClientChannel(configuration, consumer, Logger); _cancellable = Stage.Scheduler.Schedule( SelfAs <IScheduled <object?> >(), null, TimeSpan.FromMilliseconds(1), TimeSpan.FromMilliseconds(configuration.ProbeInterval)); _buffer = new MemoryStream(configuration.WriteBufferSize); }
private IRequestSender StartRequestSender(Client.Configuration configuration) { var self = SelfAs <IResponseChannelConsumer>(); var definition = Definition.Has <RequestSenderProbeActor>(Definition.Parameters(configuration, self, _testId)); var requestSender = ChildActorFor <IRequestSender>(definition); return(requestSender); }
public State( Client.Configuration configuration, IClientRequestResponseChannel channel, ResponseParser?parser, ICancellable probe, MemoryStream buffer) { Configuration = configuration; Channel = channel; Parser = parser; Probe = probe; Buffer = buffer; }
public ClientCorrelatingRequesterConsumerActor(Client.Configuration configuration) { _state = new State( configuration, ClientConsumerCommons.ClientChannel(configuration, SelfAs <IResponseChannelConsumer>(), Logger), null, Stage.Scheduler.Schedule( SelfAs <IScheduled <object?> >(), null, TimeSpan.FromMilliseconds(1), TimeSpan.FromMilliseconds(configuration.ProbeInterval)), new MemoryStream(configuration.WriteBufferSize)); _completables = new Dictionary <string, ICompletesEventually>(); _randomUuidGenerator = new RandomBasedGenerator(); }
public static IClientRequestResponseChannel ClientChannel( Client.Configuration configuration, IResponseChannelConsumer consumer, ILogger logger) { if (configuration.IsSecure) { return(new SecureClientRequestResponseChannel( configuration.AddressOfHost, consumer, configuration.ReadBufferPoolSize, configuration.ReadBufferSize, logger)); } return(new BasicClientRequestResponseChannel( configuration.AddressOfHost, consumer, configuration.ReadBufferPoolSize, configuration.ReadBufferSize, logger)); }
public LoadBalancingClientRequestConsumerActor( Client.Configuration configuration, RouterSpecification <IClientConsumer> specification) : base(specification) { }
/// <summary> /// Constructs my default state. /// </summary> /// <param name="configuration">The <see cref="Configuration"/></param> /// <param name="specification">The <see cref="RouterSpecification{T}"/></param> /// <exception cref="Exception">When the router cannot be initialized</exception> public RoundRobinClientRequestConsumerActor(Client.Configuration configuration, RouterSpecification <IClientConsumer> specification) : base(specification) { }