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 {
}
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)
- registeredServices.put(type, salReg)
- return salReg;
- }
-
- override <T extends RpcService> addMountRpcImplementation(Class<T> type, InstanceIdentifier mount, T implementation) throws IllegalStateException {
-
- val properties = new Hashtable<String, String>();
- properties.salServiceType = SAL_SERVICE_TYPE_PROVIDER
-
- // Fill requirements
- val salReg = broker.registerMountedRpcImplementation(type, implementation, mount, 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 {
- val properties = new Hashtable<String, String>();
- properties.salServiceType = SAL_SERVICE_TYPE_PROVIDER
-
- // Fill requirements
- val salReg = broker.registerRoutedRpcImplementation(type, implementation, this, properties)
+ val salReg = broker.addRoutedRpcImplementation(type, implementation)
registeredServices.put(type, salReg)
return salReg;
}
override registerFunctionality(ProviderFunctionality functionality) {
-
+ // NOOP for now
}
override unregisterFunctionality(ProviderFunctionality functionality) {
+ // NOOP for now
}
}