2 * Copyright (c) 2015 Brocade Communications Systems, Inc. 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.cluster;
10 import akka.actor.ActorSystem;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.concepts.ObjectRegistration;
15 * Interface that provides an akka ActorSystem instance.
17 * @author Thomas Pantelis
19 public interface ActorSystemProvider {
22 * Returns the ActorSystem.
24 * @return the ActorSystem.
26 @NonNull ActorSystem getActorSystem();
29 * Register a listener for ActorSystem lifecycle events.
31 * @param listener the ActorSystemProviderListener to register
32 * @return a ListenerRegistration instance to be used to unregister
34 ObjectRegistration<ActorSystemProviderListener> registerActorSystemProviderListener(
35 @NonNull ActorSystemProviderListener listener);