summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java4
-rw-r--r--infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfNotificationMapperProvider.java9
2 files changed, 8 insertions, 5 deletions
diff --git a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java
index 7acfae6..0578a34 100644
--- a/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java
+++ b/infra/minimal-distribution-core/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.java
@@ -39,6 +39,8 @@ public final class HoneycombNotificationManagerProvider extends ProviderTrait<No
@Inject
private BindingToNormalizedNodeCodec codec;
+ private NotificationProducerTracker notificationProducerTracker;
+
@Override
protected HoneycombNotificationCollector create() {
// Create the registry to keep track of what'OPERATIONAL registered
@@ -55,7 +57,7 @@ public final class HoneycombNotificationManagerProvider extends ProviderTrait<No
notificationProducerRegistry);
// Create tracker, responsible for starting and stopping registered notification producers whenever necessary
- NotificationProducerTracker notificationProducerTracker =
+ notificationProducerTracker =
new NotificationProducerTracker(notificationProducerRegistry, honeycombNotificationCollector,
notificationRouter);
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 9289936..15af3b4 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;
}