BUG 4151 : Create a shared actor system
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / ActorSystemProviderListener.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 java.util.EventListener;
12
13 /**
14  * Listener interface for notification of ActorSystem changes from an ActorSystemProvider.
15  *
16  * @author Thomas Pantelis
17  */
18 public interface ActorSystemProviderListener extends EventListener {
19     /**
20      * Method called when the current actor system is about to be shutdown.
21      */
22     void onPreShutdownActorSystem();
23
24     /**
25      * Method called when the current actor system is shutdown and a new actor system is created. This method
26      * is always preceded by a call to {@link #onPreShutdownActorSystem}.
27      *
28      * @param actorSytem the new ActorSystem
29      */
30     void onNewActorSystem(ActorSystem actorSytem);
31 }