2 * Copyright (c) 2016 Pantheon Technologies s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.openflowplugin.api.openflow.lifecycle;
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;
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
27 * <li>{@link DeviceContext}</li>
28 * <li>{@link RpcContext}</li>
29 * <li>{@link StatisticsContext}</li>
31 * Each context is created right after device connect and hold information about particular part of device.
33 * @see StatisticsContext
37 public interface ContextChainHolder extends
38 DeviceConnectedHandler,
39 ContextChainMastershipWatcher,
40 DeviceDisconnectedHandler,
42 EntityOwnershipListener,
46 * Managers need to be added before.
47 * {@link DeviceManager}
49 * {@link StatisticsManager}
50 * @param manager a child class of {@link OFPManager}
51 * @param <T> {@link OFPManager}
53 <T extends OFPManager> void addManager(T manager);
56 * Return the {@link ContextChain} for a given {@link DeviceInfo}.
57 * @return {@link ContextChain}
59 ContextChain getContextChain(DeviceInfo deviceInfo);