Remove redundant exception declarations
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / lifecycle / ContextChainHolder.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 package org.opendaylight.openflowplugin.api.openflow.lifecycle;
9
10 import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipListener;
11 import org.opendaylight.openflowplugin.api.openflow.OFPManager;
12 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
13 import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
14 import org.opendaylight.openflowplugin.api.openflow.device.DeviceManager;
15 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceConnectedHandler;
16 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceDisconnectedHandler;
17 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceRemovedHandler;
18 import org.opendaylight.openflowplugin.api.openflow.rpc.RpcContext;
19 import org.opendaylight.openflowplugin.api.openflow.rpc.RpcManager;
20 import org.opendaylight.openflowplugin.api.openflow.statistics.StatisticsContext;
21 import org.opendaylight.openflowplugin.api.openflow.statistics.StatisticsManager;
22
23 /**
24  * Generic interface for context chain holder, hold all created context chains.
25  * {@link ContextChain} is context that suppose to hold old information about device such as
26  * <ul>
27  *     <li>{@link DeviceContext}</li>
28  *     <li>{@link RpcContext}</li>
29  *     <li>{@link StatisticsContext}</li>
30  * </ul>
31  * Each context is created right after device connect and hold information about particular part of device.
32  * @since 0.4.0 Carbon
33  * @see StatisticsContext
34  * @see RpcContext
35  * @see DeviceContext
36  */
37 public interface ContextChainHolder extends
38         DeviceConnectedHandler,
39         ContextChainMastershipWatcher,
40         DeviceDisconnectedHandler,
41         DeviceRemovedHandler,
42         EntityOwnershipListener,
43         AutoCloseable {
44
45     /**
46      * Managers need to be added before.
47      * {@link DeviceManager}
48      * {@link RpcManager}
49      * {@link StatisticsManager}
50      * @param manager a child class of {@link OFPManager}
51      * @param <T> {@link OFPManager}
52      */
53     <T extends OFPManager> void addManager(T manager);
54
55     /**
56      * Return the {@link ContextChain} for a given {@link DeviceInfo}.
57      * @return {@link ContextChain}
58      */
59     ContextChain getContextChain(DeviceInfo deviceInfo);
60
61     @Override
62     void close();
63
64 }