Search in sources :

Example 1 with BindingDOMRpcServiceAdapter

use of org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcServiceAdapter 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();
}
Also used : BindingDOMRpcServiceAdapter(org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcServiceAdapter) HeliumRpcProviderRegistry(org.opendaylight.controller.md.sal.binding.compat.HeliumRpcProviderRegistry) BindingDOMRpcProviderServiceAdapter(org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcProviderServiceAdapter) BindingDOMMountPointServiceAdapter(org.opendaylight.controller.md.sal.binding.impl.BindingDOMMountPointServiceAdapter) DOMMountPointService(org.opendaylight.controller.md.sal.dom.api.DOMMountPointService) MountPointService(org.opendaylight.controller.md.sal.binding.api.MountPointService) RootBindingAwareBroker(org.opendaylight.controller.sal.binding.impl.RootBindingAwareBroker)

Example 2 with BindingDOMRpcServiceAdapter

use of org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcServiceAdapter 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;
}
Also used : RootBindingAwareBroker(org.opendaylight.controller.sal.binding.impl.RootBindingAwareBroker) Broker(org.opendaylight.controller.sal.core.api.Broker) BindingDOMRpcServiceAdapter(org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcServiceAdapter) BindingToNormalizedNodeCodec(org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec) ProviderSession(org.opendaylight.controller.sal.core.api.Broker.ProviderSession) HeliumRpcProviderRegistry(org.opendaylight.controller.md.sal.binding.compat.HeliumRpcProviderRegistry) BindingDOMRpcProviderServiceAdapter(org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcProviderServiceAdapter) MountPointService(org.opendaylight.controller.md.sal.binding.api.MountPointService) DOMMountPointService(org.opendaylight.controller.md.sal.dom.api.DOMMountPointService) RootBindingAwareBroker(org.opendaylight.controller.sal.binding.impl.RootBindingAwareBroker) RpcProviderRegistry(org.opendaylight.controller.sal.binding.api.RpcProviderRegistry) HeliumRpcProviderRegistry(org.opendaylight.controller.md.sal.binding.compat.HeliumRpcProviderRegistry)

Aggregations

MountPointService (org.opendaylight.controller.md.sal.binding.api.MountPointService)2 HeliumRpcProviderRegistry (org.opendaylight.controller.md.sal.binding.compat.HeliumRpcProviderRegistry)2 BindingDOMRpcProviderServiceAdapter (org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcProviderServiceAdapter)2 BindingDOMRpcServiceAdapter (org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcServiceAdapter)2 DOMMountPointService (org.opendaylight.controller.md.sal.dom.api.DOMMountPointService)2 RootBindingAwareBroker (org.opendaylight.controller.sal.binding.impl.RootBindingAwareBroker)2 BindingDOMMountPointServiceAdapter (org.opendaylight.controller.md.sal.binding.impl.BindingDOMMountPointServiceAdapter)1 BindingToNormalizedNodeCodec (org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec)1 RpcProviderRegistry (org.opendaylight.controller.sal.binding.api.RpcProviderRegistry)1 Broker (org.opendaylight.controller.sal.core.api.Broker)1 ProviderSession (org.opendaylight.controller.sal.core.api.Broker.ProviderSession)1