Merge "Exposed binding-rpc-registry to config subsystem."
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / sal / binding / impl / OsgiProviderContext.xtend
index 7fd3fd24d86e5d48b802c96ea5c570c675528c87..d1ec35157f5770080b75fbe794637c220c0a2d43 100644 (file)
@@ -33,22 +33,13 @@ class OsgiProviderContext extends OsgiConsumerContext implements ProviderContext
     }
 
     override <T extends RpcService> addRpcImplementation(Class<T> type, T implementation) {
-
-        // TODO Auto-generated method stub
-        val properties = new Hashtable<String, String>();
-        properties.salServiceType = SAL_SERVICE_TYPE_PROVIDER
-
-        // Fill requirements
-        val salReg = broker.registerRpcImplementation(type, implementation, this, properties)
+        val salReg = broker.addRpcImplementation(type, implementation)
         registeredServices.put(type, salReg)
         return salReg;
     }
 
     override <T extends RpcService> addRoutedRpcImplementation(Class<T> type, T implementation) throws IllegalStateException {
-        checkNotNull(type, "Service type should not be null")
-        checkNotNull(implementation, "Service type should not be null")
-        
-        val salReg = broker.registerRoutedRpcImplementation(type, implementation, this)
+        val salReg = broker.addRoutedRpcImplementation(type, implementation)
         registeredServices.put(type, salReg)
         return salReg;
     }