use of org.opendaylight.controller.md.sal.binding.api.MountPointService in project controller by opendaylight.
the class BindingTestContext method startBindingBroker.
public void startBindingBroker() {
checkState(this.executor != null, "Executor needs to be set");
checkState(this.baNotifyImpl != null, "Notification Service must be started");
this.baConsumerRpc = new BindingDOMRpcServiceAdapter(getDomRpcInvoker(), this.codec);
this.baProviderRpc = new BindingDOMRpcProviderServiceAdapter(getDomRpcRegistry(), this.codec);
this.baBrokerImpl = new RootBindingAwareBroker("test");
final MountPointService mountService = new BindingDOMMountPointServiceAdapter(this.biMountImpl, this.codec);
this.baBrokerImpl.setMountService(mountService);
this.baBrokerImpl.setRpcBroker(new HeliumRpcProviderRegistry(this.baConsumerRpc, this.baProviderRpc));
this.baBrokerImpl.setNotificationBroker(this.baNotifyImpl);
this.baBrokerImpl.start();
}
use of org.opendaylight.controller.md.sal.binding.api.MountPointService 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