2 * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.eos.akka.bootstrap.command;
10 import static java.util.Objects.requireNonNull;
12 import akka.actor.typed.ActorRef;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.controller.eos.akka.owner.checker.command.StateCheckerCommand;
15 import org.opendaylight.controller.eos.akka.owner.supervisor.command.OwnerSupervisorCommand;
16 import org.opendaylight.controller.eos.akka.registry.candidate.command.CandidateRegistryCommand;
17 import org.opendaylight.controller.eos.akka.registry.listener.type.command.TypeListenerRegistryCommand;
19 public final class RunningContext extends BootstrapCommand {
20 private final @NonNull ActorRef<TypeListenerRegistryCommand> listenerRegistry;
21 private final @NonNull ActorRef<CandidateRegistryCommand> candidateRegistry;
22 private final @NonNull ActorRef<StateCheckerCommand> ownerStateChecker;
23 private final @NonNull ActorRef<OwnerSupervisorCommand> ownerSupervisor;
25 public RunningContext(final ActorRef<TypeListenerRegistryCommand> listenerRegistry,
26 final ActorRef<CandidateRegistryCommand> candidateRegistry,
27 final ActorRef<StateCheckerCommand> ownerStateChecker,
28 final ActorRef<OwnerSupervisorCommand> ownerSupervisor) {
29 this.listenerRegistry = requireNonNull(listenerRegistry);
30 this.candidateRegistry = requireNonNull(candidateRegistry);
31 this.ownerStateChecker = requireNonNull(ownerStateChecker);
32 this.ownerSupervisor = requireNonNull(ownerSupervisor);
35 public @NonNull ActorRef<TypeListenerRegistryCommand> getListenerRegistry() {
36 return listenerRegistry;
39 public @NonNull ActorRef<CandidateRegistryCommand> getCandidateRegistry() {
40 return candidateRegistry;
43 public @NonNull ActorRef<StateCheckerCommand> getOwnerStateChecker() {
44 return ownerStateChecker;
47 public @NonNull ActorRef<OwnerSupervisorCommand> getOwnerSupervisor() {
48 return ownerSupervisor;