X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fimpl%2FOsgiProviderContext.xtend;h=7fd3fd24d86e5d48b802c96ea5c570c675528c87;hb=87246fdb069fad43135b623971bdf6ebe7df828a;hp=494118b694a0f9a43c96c5dd747ecf3e3f4ea8f1;hpb=526185d061ed50c75890b31a376e9495144b660a;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/OsgiProviderContext.xtend b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/OsgiProviderContext.xtend index 494118b694..7fd3fd24d8 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/OsgiProviderContext.xtend +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/OsgiProviderContext.xtend @@ -20,6 +20,7 @@ import static extension org.opendaylight.controller.sal.binding.impl.osgi.Proper import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration import org.opendaylight.yangtools.yang.binding.InstanceIdentifier import org.opendaylight.controller.sal.binding.api.BindingAwareProvider.ProviderFunctionality +import static com.google.common.base.Preconditions.* class OsgiProviderContext extends OsgiConsumerContext implements ProviderContext { @@ -43,31 +44,20 @@ class OsgiProviderContext extends OsgiConsumerContext implements ProviderContext return salReg; } - override addMountRpcImplementation(Class type, InstanceIdentifier mount, T implementation) throws IllegalStateException { - - val properties = new Hashtable(); - properties.salServiceType = SAL_SERVICE_TYPE_PROVIDER - - // Fill requirements - val salReg = broker.registerMountedRpcImplementation(type, implementation, mount, this, properties) - registeredServices.put(type, salReg) - return salReg; - } - override addRoutedRpcImplementation(Class type, T implementation) throws IllegalStateException { - val properties = new Hashtable(); - properties.salServiceType = SAL_SERVICE_TYPE_PROVIDER - - // Fill requirements - val salReg = broker.registerRoutedRpcImplementation(type, implementation, this, properties) + checkNotNull(type, "Service type should not be null") + checkNotNull(implementation, "Service type should not be null") + + val salReg = broker.registerRoutedRpcImplementation(type, implementation, this) registeredServices.put(type, salReg) return salReg; } override registerFunctionality(ProviderFunctionality functionality) { - + // NOOP for now } override unregisterFunctionality(ProviderFunctionality functionality) { + // NOOP for now } }