use of org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceWithInterestListeners in project controller by opendaylight.
the class NotificationBrokerImplModule method createHeliumAdapter.
private static AutoCloseable createHeliumAdapter(final NotificationPublishService publishService, final NotificationService listenService) {
if (listenService instanceof BindingDOMNotificationServiceAdapter && publishService instanceof BindingDOMNotificationPublishServiceAdapter) {
final BindingDOMNotificationPublishServiceAdapter castedPublish = (BindingDOMNotificationPublishServiceAdapter) publishService;
final BindingDOMNotificationServiceAdapter castedListen = (BindingDOMNotificationServiceAdapter) listenService;
final DOMNotificationPublishService domPublishService = castedPublish.getDomPublishService();
if (domPublishService instanceof DOMNotificationSubscriptionListenerRegistry) {
final DOMNotificationSubscriptionListenerRegistry subsRegistry = (DOMNotificationSubscriptionListenerRegistry) domPublishService;
return new HeliumNotificationProviderServiceWithInterestListeners(castedPublish, castedListen, subsRegistry);
}
}
return new HeliumNotificationProviderServiceAdapter(publishService, listenService);
}
Aggregations