Search in sources :

Example 1 with ProviderSession

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