use of org.opendaylight.controller.sal.core.api.Broker.ProviderSession in project controller by opendaylight.
the class BindingBrokerImplModule method createInstance.
@Override
public RootBindingAwareBroker createInstance() {
final Broker domBroker = getDomAsyncBrokerDependency();
final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency();
final ProviderSession session = domBroker.registerProvider(new DummyDOMProvider());
final MountPointService mount = createMountPointAdapter(codec, session);
final BindingDOMRpcServiceAdapter rpcConsumer = createRpcConsumer(codec, session);
final BindingDOMRpcProviderServiceAdapter rpcProvider = createRpcProvider(codec, session);
final RootBindingAwareBroker broker = new RootBindingAwareBroker(getIdentifier().getInstanceName());
final RpcProviderRegistry heliumRpcBroker = new HeliumRpcProviderRegistry(rpcConsumer, rpcProvider);
broker.setNotificationBroker(getNotificationServiceDependency());
if (getNotificationPublishServiceDependency() != null) {
broker.setNotificationPublishService(getNotificationPublishServiceDependency());
}
broker.setRpcBroker(heliumRpcBroker);
broker.setDataBroker(getRootDataBrokerDependency());
broker.setMountService(mount);
broker.start();
return broker;
}
Aggregations