Improve cleanup after device disconnected event
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / handlers / DeviceLifecycleSupervisor.java
1 /**
2  * Copyright (c) 2015 Cisco 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
9 package org.opendaylight.openflowplugin.api.openflow.device.handlers;
10
11 /**
12  * openflowplugin-api
13  * org.opendaylight.openflowplugin.api.openflow.device.handlers
14  *
15  * Interface has to implement all relevant manager to correctly handling
16  * device initialization and termination phase. Methods are used for order
17  * handlers in initialization/termination phase. Ordering is easily changed
18  * by definition.
19  *
20  */
21 public interface DeviceLifecycleSupervisor {
22
23     /**
24      * Method sets relevant {@link DeviceInitializationPhaseHandler} for building
25      * handler's chain for new Device initial phase.
26      *
27      * @param handler initialization phase handler
28      */
29     void setDeviceInitializationPhaseHandler(DeviceInitializationPhaseHandler handler);
30
31     /**
32      * Method sets relevant {@link DeviceInitializationPhaseHandler} for annihilating
33      * handler's chain for dead Device termination phase.
34      *
35      * @param handler termination phase handler
36      */
37     void setDeviceTerminationPhaseHandler(DeviceTerminationPhaseHandler handler);
38 }