Rename packages
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / ActorSystemProvider.java
1 /*
2  * Copyright (c) 2015 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.cluster;
9
10 import akka.actor.ActorSystem;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.yangtools.concepts.ListenerRegistration;
13
14 /**
15  * Interface that provides an akka ActorSystem instance.
16  *
17  * @author Thomas Pantelis
18  */
19 public interface ActorSystemProvider {
20     /**
21      * @return the current ActorSystem.
22      */
23     @Nonnull
24     ActorSystem getActorSystem();
25
26     /**
27      * Register a listener for ActorSystem lifecycle events.
28      *
29      * @param listener the ActorSystemProviderListener to register
30      * @return a ListenerRegistration instance to be used to unregister
31      */
32     ListenerRegistration<ActorSystemProviderListener> registerActorSystemProviderListener(
33             @Nonnull ActorSystemProviderListener listener);
34 }