2 * Copyright IBM Corporation, 2013. 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.controller.md.statistics.manager;
11 import org.opendaylight.controller.sal.binding.api.AbstractBindingAwareProvider;
12 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
13 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
14 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
15 import org.osgi.framework.BundleContext;
17 public class StatisticsManagerActivator extends AbstractBindingAwareProvider {
19 private static ProviderContext pSession;
21 private static StatisticsProvider statsProvider = new StatisticsProvider();
24 public void onSessionInitiated(ProviderContext session) {
27 DataProviderService dps = session.<DataProviderService>getSALService(DataProviderService.class);
28 StatisticsManagerActivator.statsProvider.setDataService(dps);
29 NotificationProviderService nps = session.<NotificationProviderService>getSALService(NotificationProviderService.class);
30 StatisticsManagerActivator.statsProvider.setNotificationService(nps);
31 StatisticsManagerActivator.statsProvider.start();
36 protected void stopImpl(BundleContext context) {
37 StatisticsManagerActivator.statsProvider.close();
40 public static ProviderContext getProviderContext(){