-
- public void start() {
-
- NotificationProviderService nps = this.getNotificationService();
- Registration<NotificationListener> registerNotificationListener = nps.registerNotificationListener(this.updateCommiter);
- this.listenerRegistration = registerNotificationListener;
-
+
+ private ListenerRegistration<DataChangeListener> flowCapableTrackerRegistration;
+
+ public void start(final DataBrokerService dbs, final NotificationProviderService nps, final RpcConsumerRegistry rpcRegistry) {
+
+ // Get Group/Meter statistics service instances
+ groupStatsService = rpcRegistry.getRpcService(OpendaylightGroupStatisticsService.class);
+ meterStatsService = rpcRegistry.getRpcService(OpendaylightMeterStatisticsService.class);
+ flowStatsService = rpcRegistry.getRpcService(OpendaylightFlowStatisticsService.class);
+ portStatsService = rpcRegistry.getRpcService(OpendaylightPortStatisticsService.class);
+ flowTableStatsService = rpcRegistry.getRpcService(OpendaylightFlowTableStatisticsService.class);
+ queueStatsService = rpcRegistry.getRpcService(OpendaylightQueueStatisticsService.class);
+
+ // Start receiving notifications
+ this.listenerRegistration = nps.registerNotificationListener(this.updateCommiter);
+
+ // Register for switch connect/disconnect notifications
+ final InstanceIdentifier<FlowCapableNode> fcnId = InstanceIdentifier.builder(Nodes.class)
+ .child(Node.class).augmentation(FlowCapableNode.class).build();
+ this.flowCapableTrackerRegistration = dbs.registerDataChangeListener(fcnId,
+ new FlowCapableTracker(this, fcnId));
+