Make DOMSchemaService operate of EffectiveModelContext
[mdsal.git] / dom / mdsal-dom-broker / src / main / java / org / opendaylight / mdsal / dom / broker / DOMRpcRouter.java
index e05d4e628ed75a79465191e71c8de93a8d5848e6..2128bd7fa986ec4248d5fce2dd4b2c80ecbab18d 100644 (file)
@@ -69,13 +69,13 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodes;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextListener;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public final class DOMRpcRouter extends AbstractRegistration implements SchemaContextListener {
+public final class DOMRpcRouter extends AbstractRegistration implements EffectiveModelContextListener {
     private static final ThreadFactory THREAD_FACTORY = new ThreadFactoryBuilder().setNameFormat(
             "DOMRpcRouter-listener-%s").setDaemon(true).build();
 
@@ -175,13 +175,14 @@ public final class DOMRpcRouter extends AbstractRegistration implements SchemaCo
     }
 
     @Override
-    public synchronized void onGlobalContextUpdated(final SchemaContext context) {
+    public synchronized void onModelContextUpdated(final EffectiveModelContext newModelContext) {
         final DOMRpcRoutingTable oldTable = routingTable;
-        final DOMRpcRoutingTable newTable = (DOMRpcRoutingTable) oldTable.setSchemaContext(context);
+        final DOMRpcRoutingTable newTable = (DOMRpcRoutingTable) oldTable.setSchemaContext(newModelContext);
         routingTable = newTable;
 
         final DOMActionRoutingTable oldActionTable = actionRoutingTable;
-        final DOMActionRoutingTable newActionTable = (DOMActionRoutingTable) oldActionTable.setSchemaContext(context);
+        final DOMActionRoutingTable newActionTable =
+                (DOMActionRoutingTable) oldActionTable.setSchemaContext(newModelContext);
         actionRoutingTable = newActionTable;
     }