Refactored implementation of Notification Invoker
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / sal / binding / codegen / impl / RpcRouterCodegenInstance.xtend
index b255504a00e46e57eda13ae18d7aa403b2f5da47..f63f2a313ef58375e95d165f4b5823b504cda3d4 100644 (file)
@@ -12,41 +12,39 @@ import org.opendaylight.yangtools.yang.binding.DataObject
 import static org.opendaylight.controller.sal.binding.codegen.impl.XtendHelper.*
 
 class RpcRouterCodegenInstance<T extends RpcService> implements RpcRouter<T> {
-    
+
     @Property
     val T invocationProxy
-    
+
     @Property
     val Class<T> rpcServiceType
-    
+
     @Property
     val Set<Class<? extends BaseIdentity>> contexts
-    
-    val routingTables = new HashMap<Class<? extends BaseIdentity>,RpcRoutingTableImpl<? extends BaseIdentity,?>>;
-    
-    
-    
+
+    val routingTables = new HashMap<Class<? extends BaseIdentity>, RpcRoutingTableImpl<? extends BaseIdentity, ?>>;
+
     @Property
     var T defaultService
-    
-    new(Class<T> type,T routerImpl,Set<Class<? extends BaseIdentity>> contexts) {
+
+    new(Class<T> type, T routerImpl, Set<Class<? extends BaseIdentity>> contexts) {
         _rpcServiceType = type
         _invocationProxy = routerImpl
         _contexts = contexts
-        
-        for(ctx : contexts) {
+
+        for (ctx : contexts) {
             val table = XtendHelper.createRoutingTable(ctx)
-            invocationProxy.setRoutingTable(ctx,table.routes);
-            routingTables.put(ctx,table);
+            invocationProxy.setRoutingTable(ctx, table.routes);
+            routingTables.put(ctx, table);
         }
     }
-    
+
     override <C extends BaseIdentity> getRoutingTable(Class<C> table) {
         routingTables.get(table) as RpcRoutingTable<C,T>
     }
-    
+
     override getService(Class<? extends BaseIdentity> context, InstanceIdentifier<?> path) {
         val table = getRoutingTable(context);
         return table.getRoute(path);
     }
-}
\ No newline at end of file
+}