summaryrefslogtreecommitdiffstats
path: root/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java
diff options
context:
space:
mode:
Diffstat (limited to 'infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java')
-rw-r--r--infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java b/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java
index 9289936ac..15af3b451 100644
--- a/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java
+++ b/infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java
@@ -57,6 +57,8 @@ public class NetconfNotificationMapperProvider extends ProviderTrait<NetconfOper
@Inject
private ShutdownHandler shutdownHandler;
+ private CapabilityChangeNotificationProducer capabilityChangeNotificationProducer;
+
@Override
protected NetconfNotificationOperationServiceFactory create() {
LOG.trace("Initializing NotificationToMdsalWriter");
@@ -64,16 +66,15 @@ public class NetconfNotificationMapperProvider extends ProviderTrait<NetconfOper
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;
}