2 * Copyright (c) 2015 Cisco Systems, Inc. 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
9 package org.opendaylight.openflowplugin.impl;
12 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
13 import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
14 import org.opendaylight.openflowplugin.api.openflow.OpenFlowPluginProvider;
15 import org.opendaylight.openflowplugin.api.openflow.device.DeviceManager;
16 import org.opendaylight.openflowplugin.api.openflow.rpc.RpcManager;
17 import org.opendaylight.openflowplugin.api.openflow.statistics.StatisticsManager;
18 import org.opendaylight.openflowplugin.impl.device.DeviceManagerImpl;
19 import org.opendaylight.openflowplugin.impl.rpc.RpcManagerImpl;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.api.types.rev150327.OfpRole;
21 import java.util.Collection;
24 * Created by Martin Bobak <mbobak@cisco.com> on 27.3.2015.
26 public class OpenflowPluginProviderImpl implements OpenFlowPluginProvider {
28 private DeviceManager deviceManager;
29 private RpcManager rpcManager;
30 private BindingAwareBroker.ProviderContext providerContext;
31 private StatisticsManager statisticsManager;
34 public void onSessionInitiated(final BindingAwareBroker.ProviderContext session) {
35 providerContext = session;
39 public void setSwitchConnectionProviders(final Collection<SwitchConnectionProvider> switchConnectionProvider) {
44 public void setRole(final OfpRole role) {
49 public void initialize() {
50 deviceManager = new DeviceManagerImpl();
51 rpcManager = new RpcManagerImpl(providerContext);
52 //TODO : initialize statistics manager
56 public void close() throws Exception {