public SipActorProvider(ActorSystem actorSystem, IUnitOfWork unitOfWork, IHttpService httpService, IInterpretActorProvider interpretActorProvider, IProcessBlockActorProvider processBlockActorProvider, ISigningActorProvider signingActorProvider, ILogger <SipActorProvider> logger) { this.logger = logger; actor = actorSystem.ActorOf(SipActor.Props(unitOfWork, httpService, interpretActorProvider, processBlockActorProvider, signingActorProvider), "sip-actor"); }
public BoostGraphActorProvider(ActorSystem actotSystem, IUnitOfWork unitOfWork, IHttpService httpService, IInterpretActorProvider interpretActorProvider, IProcessBlockActorProvider processBlockActorProvider, ISigningActorProvider signingActorProvider) { actor = actotSystem.ActorOf(Props.Create(() => new BoostGraphActor ( unitOfWork, httpService, interpretActorProvider, processBlockActorProvider, signingActorProvider )), "boostgraph-actor"); }
public SipActor(IUnitOfWork unitOfWork, IHttpService httpService, IInterpretActorProvider interpretActorProvider, IProcessBlockActorProvider processBlockActorProvider, ISigningActorProvider signingActorProvider) { this.unitOfWork = unitOfWork; this.httpService = httpService; this.interpretActorProvider = interpretActorProvider; this.processBlockActorProvider = processBlockActorProvider; this.signingActorProvider = signingActorProvider; logger = Context.GetLogger(); BoostGraphs = new Dictionary <string, IActorRef>(); Receive <HashedMessage>(Register); ReceiveAsync <GracefulStopMessge>(async message => await GracefulStop(message)); }
public BoostGraphActor(IUnitOfWork unitOfWork, IHttpService httpService, IInterpretActorProvider interpretActorProvider, IProcessBlockActorProvider processBlockActorProvider, ISigningActorProvider signingActorProvider) { this.unitOfWork = unitOfWork; this.httpService = httpService; this.interpretActorProvider = interpretActorProvider; this.processBlockActorProvider = processBlockActorProvider; this.signingActorProvider = signingActorProvider; logger = Context.GetLogger(); totalNodes = httpService.Members.Count + 1; if (totalNodes < requiredNodeCount) { logger.Warning($"<<< BoostGraph >>>: Minimum number of nodes required (4). Total number of nodes ({totalNodes})"); } ReceiveAsync <HashedMessage>(async message => await Register(message)); ReceiveAsync <ProcessBlockMessage>(async message => await Process(message)); }
/// <summary> /// /// </summary> /// <param name="unitOfWork"></param> /// <param name="httpService"></param> /// <param name="interpretActorProvider"></param> /// <param name="processBlockActorProvider"></param> /// <param name="signingActorProvider"></param> /// <returns></returns> public static Props Props(IUnitOfWork unitOfWork, IHttpService httpService, IInterpretActorProvider interpretActorProvider, IProcessBlockActorProvider processBlockActorProvider, ISigningActorProvider signingActorProvider) => Akka.Actor.Props.Create(() => new SipActor(unitOfWork, httpService, interpretActorProvider, processBlockActorProvider, signingActorProvider));