private ConnectionSupervisorActor(final SupervisorStrategy supervisorStrategy, final Duration minBackoff, final Duration maxBackoff, final double randomFactor, final ActorRef pubSubMediator, final ActorRef conciergeForwarder, final ClientActorPropsFactory propsFactory, @Nullable final ConnectivityCommandInterceptor commandValidator) { try { this.connectionId = URLDecoder.decode(getSelf().path().name(), StandardCharsets.UTF_8.name()); } catch (final UnsupportedEncodingException e) { throw new IllegalStateException("Unsupported encoding", e); } this.supervisorStrategy = supervisorStrategy; this.minBackoff = minBackoff; this.maxBackoff = maxBackoff; this.randomFactor = randomFactor; this.persistenceActorProps = ConnectionActor.props(connectionId, pubSubMediator, conciergeForwarder, propsFactory, commandValidator); }
private ConnectionSupervisorActor(final SupervisorStrategy supervisorStrategy, final Duration minBackoff, final Duration maxBackoff, final double randomFactor, final ActorRef pubSubMediator, final ActorRef conciergeForwarder, final ClientActorPropsFactory propsFactory, @Nullable final ConnectivityCommandInterceptor commandValidator) { try { this.connectionId = URLDecoder.decode(getSelf().path().name(), StandardCharsets.UTF_8.name()); } catch (final UnsupportedEncodingException e) { throw new IllegalStateException("Unsupported encoding", e); } this.supervisorStrategy = supervisorStrategy; this.minBackoff = minBackoff; this.maxBackoff = maxBackoff; this.randomFactor = randomFactor; this.persistenceActorProps = ConnectionActor.props(connectionId, pubSubMediator, conciergeForwarder, propsFactory, commandValidator); }
final Duration restartDelay = calculateRestartDelay(); getContext().system().scheduler() .scheduleOnce(new FiniteDuration(restartDelay.toNanos(), TimeUnit.NANOSECONDS), getSelf(), StartChild.getInstance(), getContext().dispatcher(), null); builder.dittoHeaders(((WithDittoHeaders) message).getDittoHeaders()); getSender().tell(builder.build(), getSelf());
final Duration restartDelay = calculateRestartDelay(); getContext().system().scheduler() .scheduleOnce(new FiniteDuration(restartDelay.toNanos(), TimeUnit.NANOSECONDS), getSelf(), StartChild.getInstance(), getContext().dispatcher(), null); builder.dittoHeaders(((WithDittoHeaders) message).getDittoHeaders()); getSender().tell(builder.build(), getSelf());