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 javax.annotation.Nonnull;
12 import org.opendaylight.yangtools.concepts.ListenerRegistration;
15 * Interface that provides an akka ActorSystem instance.
17 * @author Thomas Pantelis
19 public interface ActorSystemProvider {
22 * Returns the ActorSystem.
24 * @return the ActorSystem.
27 ActorSystem getActorSystem();
30 * Register a listener for ActorSystem lifecycle events.
32 * @param listener the ActorSystemProviderListener to register
33 * @return a ListenerRegistration instance to be used to unregister
35 ListenerRegistration<ActorSystemProviderListener> registerActorSystemProviderListener(
36 @Nonnull ActorSystemProviderListener listener);