@Inject
private BindingToNormalizedNodeCodec codec;
+ private NotificationProducerTracker notificationProducerTracker;
+
@Override
protected HoneycombNotificationCollector create() {
// Create the registry to keep track of what'OPERATIONAL registered
notificationProducerRegistry);
// Create tracker, responsible for starting and stopping registered notification producers whenever necessary
- NotificationProducerTracker notificationProducerTracker =
+ notificationProducerTracker =
new NotificationProducerTracker(notificationProducerRegistry, honeycombNotificationCollector,
notificationRouter);
@Inject
private ShutdownHandler shutdownHandler;
+ private CapabilityChangeNotificationProducer capabilityChangeNotificationProducer;
+
@Override
protected NetconfNotificationOperationServiceFactory create() {
LOG.trace("Initializing NotificationToMdsalWriter");
writer.start();
LOG.trace("Initializing CapabilityChangeNotificationProducer");
- final CapabilityChangeNotificationProducer capabilityChangeNotificationProducer =
- new CapabilityChangeNotificationProducer(notificationCollector, dataBroker);
+ capabilityChangeNotificationProducer =
+ new CapabilityChangeNotificationProducer(notificationCollector, dataBroker);
LOG.trace("Providing NetconfNotificationOperationServiceFactory");
final NetconfNotificationOperationServiceFactory netconfNotificationOperationServiceFactory =
new NetconfNotificationOperationServiceFactory(notificationRegistry, aggregator);
shutdownHandler.register("netconf-notification-service-factory", netconfNotificationOperationServiceFactory);
- shutdownHandler.register("capability-change-notification-producer",
- capabilityChangeNotificationProducer::close);
+ shutdownHandler.register("capability-change-notification-producer", capabilityChangeNotificationProducer);
shutdownHandler.register("notification-to-mdsal-writer", writer);
return netconfNotificationOperationServiceFactory;
}