Search in sources :

Example 1 with BindingDOMNotificationServiceAdapter

use of org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter in project controller by opendaylight.

the class BindingTestContext method startBindingNotificationBroker.

public void startBindingNotificationBroker() {
    checkState(this.executor != null);
    final DOMNotificationRouter router = DOMNotificationRouter.create(16);
    this.domPublishService = router;
    this.domListenService = router;
    this.publishService = new BindingDOMNotificationPublishServiceAdapter(this.codec, this.domPublishService);
    this.listenService = new BindingDOMNotificationServiceAdapter(this.codec, this.domListenService);
    this.baNotifyImpl = new HeliumNotificationProviderServiceAdapter(this.publishService, this.listenService);
}
Also used : BindingDOMNotificationServiceAdapter(org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter) BindingDOMNotificationPublishServiceAdapter(org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter) DOMNotificationRouter(org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter) HeliumNotificationProviderServiceAdapter(org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceAdapter)

Example 2 with BindingDOMNotificationServiceAdapter

use of org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter in project controller by opendaylight.

the class BindingNotificationAdapterModule method createInstance.

@Override
public java.lang.AutoCloseable createInstance() {
    final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency();
    final Broker.ProviderSession session = getDomAsyncBrokerDependency().registerProvider(new DummyDOMProvider());
    final DOMNotificationService notifService = session.getService(DOMNotificationService.class);
    return new BindingDOMNotificationServiceAdapter(codec.getCodecRegistry(), notifService);
}
Also used : BindingDOMNotificationServiceAdapter(org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter) Broker(org.opendaylight.controller.sal.core.api.Broker) BindingToNormalizedNodeCodec(org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec) DOMNotificationService(org.opendaylight.controller.md.sal.dom.api.DOMNotificationService)

Example 3 with BindingDOMNotificationServiceAdapter

use of org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter 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

BindingDOMNotificationServiceAdapter (org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter)3 HeliumNotificationProviderServiceAdapter (org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceAdapter)2 BindingDOMNotificationPublishServiceAdapter (org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter)2 HeliumNotificationProviderServiceWithInterestListeners (org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceWithInterestListeners)1 BindingToNormalizedNodeCodec (org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec)1 DOMNotificationPublishService (org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService)1 DOMNotificationService (org.opendaylight.controller.md.sal.dom.api.DOMNotificationService)1 DOMNotificationRouter (org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter)1 DOMNotificationSubscriptionListenerRegistry (org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListenerRegistry)1 Broker (org.opendaylight.controller.sal.core.api.Broker)1