Search in sources :

Example 1 with DOMNotificationSubscriptionListenerRegistry

use of org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListenerRegistry 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);
}
Also used : BindingDOMNotificationServiceAdapter(org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter) BindingDOMNotificationPublishServiceAdapter(org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter) HeliumNotificationProviderServiceWithInterestListeners(org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceWithInterestListeners) HeliumNotificationProviderServiceAdapter(org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceAdapter) DOMNotificationPublishService(org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService) DOMNotificationSubscriptionListenerRegistry(org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListenerRegistry)

Aggregations

HeliumNotificationProviderServiceAdapter (org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceAdapter)1 HeliumNotificationProviderServiceWithInterestListeners (org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceWithInterestListeners)1 BindingDOMNotificationPublishServiceAdapter (org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter)1 BindingDOMNotificationServiceAdapter (org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter)1 DOMNotificationPublishService (org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService)1 DOMNotificationSubscriptionListenerRegistry (org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListenerRegistry)1