Update to MD-SAL models
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / sal / binding / impl / BindingAwareBrokerImpl.xtend
index 8a3d2c0ecc12a49161bee2ec8012d5f2707279e7..2bae9f515f40bfe4ed25e95ccd4426493c413a22 100644 (file)
@@ -31,6 +31,8 @@ import org.opendaylight.controller.sal.binding.codegen.impl.RuntimeCodeGenerator
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration
+import org.opendaylight.controller.sal.binding.api.data.DataProviderService
+import org.opendaylight.controller.sal.binding.api.data.DataBrokerService
 
 class BindingAwareBrokerImpl implements BindingAwareBroker {
     private static val log = LoggerFactory.getLogger(BindingAwareBrokerImpl)
@@ -39,6 +41,7 @@ class BindingAwareBrokerImpl implements BindingAwareBroker {
     private var RuntimeCodeGenerator generator;
     private Map<Class<? extends RpcService>, RpcProxyContext> managedProxies = new HashMap();
     private var NotificationBrokerImpl notifyBroker
+    private var DataBrokerImpl dataBroker
     private var ServiceRegistration<NotificationProviderService> notifyBrokerRegistration
 
     @Property
@@ -49,10 +52,14 @@ class BindingAwareBrokerImpl implements BindingAwareBroker {
 
         // Initialization of notificationBroker
         notifyBroker = new NotificationBrokerImpl(null);
+        dataBroker = new DataBrokerImpl();
         val brokerProperties = newProperties();
         notifyBrokerRegistration = brokerBundleContext.registerService(NotificationProviderService, notifyBroker,
             brokerProperties)
         brokerBundleContext.registerService(NotificationService, notifyBroker, brokerProperties)
+        brokerBundleContext.registerService(DataProviderService,dataBroker,brokerProperties)
+        brokerBundleContext.registerService(DataBrokerService,dataBroker,brokerProperties)
+        
     }
 
     def initGenerator() {
@@ -126,7 +133,7 @@ class BindingAwareBrokerImpl implements BindingAwareBroker {
         return new RpcServiceRegistrationImpl<T>(type, service, osgiReg);
     }
 
-    def <T extends RpcService> RpcRegistration<T> registerMountedRpcImplementation(Class<T> tyoe, T service, InstanceIdentifier identifier,
+    def <T extends RpcService> RpcRegistration<T> registerMountedRpcImplementation(Class<T> tyoe, T service, InstanceIdentifier<?> identifier,
         OsgiProviderContext context, Hashtable<String, String> properties) {
         throw new UnsupportedOperationException("TODO: auto-generated method stub")
     }