Implement connection core layer basic behavior
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / OFPManager.java
1 /*
2  * Copyright (c) 2016 Pantheon Technologies s.r.o. 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;
10
11 import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
12 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceInitializationPhaseHandler;
13 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceLifecycleSupervisor;
14 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceRemovedHandler;
15 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceTerminationPhaseHandler;
16
17 /**
18  * This interface is responsible for managing lifecycle of itself and all it's associated contexts.
19  * Every manager that implements this interface must handle connection initialization and termination chain
20  * by implementing methods from
21  * {@link org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceLifecycleSupervisor},
22  * then it must handle initialization and termination chain of it's associated context by implementing methods from
23  * {@link org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceInitializationPhaseHandler} and
24  * {@link org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceTerminationPhaseHandler} and also removal
25  * of these contexts from it's internal map of contexts by implementing methods from
26  * {@link org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceRemovedHandler}. And at last, it must
27  * handle it's own full termination by implementing {@link AutoCloseable#close()}
28  */
29 public interface OFPManager extends
30         DeviceLifecycleSupervisor,
31         DeviceInitializationPhaseHandler,
32         DeviceTerminationPhaseHandler,
33         DeviceRemovedHandler,
34         AutoCloseable {
35
36     @Override
37     void close();
38 }