use of org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter 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);
}
use of org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter in project controller by opendaylight.
the class BindingNotificationPublishAdapterModule method createInstance.
@Override
public AutoCloseable createInstance() {
final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency();
final Broker.ProviderSession session = getDomAsyncBrokerDependency().registerProvider(new DummyDOMProvider());
final DOMNotificationPublishService publishService = session.getService(DOMNotificationPublishService.class);
return new BindingDOMNotificationPublishServiceAdapter(codec, publishService);
}
use of org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter 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