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 * TODO: Handle multipart messages with following flag true
10 * OFPMPF_REPLY_MORE = 1 << 0
11 * Better accumulate all the messages and update local cache
12 * and configurational data store
14 package org.opendaylight.controller.md.statistics.manager;
16 import org.opendaylight.controller.sal.binding.api.AbstractBindingAwareProvider;
17 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
18 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
19 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
20 import org.osgi.framework.BundleContext;
22 public class StatisticsManagerActivator extends AbstractBindingAwareProvider {
24 private static ProviderContext pSession;
26 private static StatisticsProvider statsProvider = new StatisticsProvider();
29 public void onSessionInitiated(ProviderContext session) {
32 DataProviderService dps = session.<DataProviderService>getSALService(DataProviderService.class);
33 StatisticsManagerActivator.statsProvider.setDataService(dps);
34 NotificationProviderService nps = session.<NotificationProviderService>getSALService(NotificationProviderService.class);
35 StatisticsManagerActivator.statsProvider.setNotificationService(nps);
36 StatisticsManagerActivator.statsProvider.start();
41 protected void stopImpl(BundleContext context) {
42 StatisticsManagerActivator.statsProvider.close();
45 public static ProviderContext getProviderContext(){