Clean up NetconfNodeActor fields
[netconf.git] / apps / netconf-topology-singleton / src / main / java / org / opendaylight / netconf / topology / singleton / messages / RefreshSlaveActor.java
index 3151a008912c81b395902aedc19f290de58d3446..91ef3591504672ad72e3baed563547f2b9d3592a 100644 (file)
@@ -7,25 +7,21 @@
  */
 package org.opendaylight.netconf.topology.singleton.messages;
 
+import static java.util.Objects.requireNonNull;
+
 import akka.util.Timeout;
 import org.opendaylight.netconf.client.mdsal.api.RemoteDeviceId;
 import org.opendaylight.netconf.topology.singleton.impl.utils.NetconfTopologySetup;
-import org.opendaylight.yangtools.yang.model.repo.api.SchemaRepository;
-import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceRegistry;
 
 public class RefreshSlaveActor {
-    private final SchemaRepository schemaRepository;
     private final RemoteDeviceId id;
-    private final SchemaSourceRegistry schemaRegistry;
     private final NetconfTopologySetup setup;
     private final Timeout actorResponseWaitTime;
 
     public RefreshSlaveActor(final NetconfTopologySetup setup, final RemoteDeviceId id,
-                             final Timeout actorResponseWaitTime) {
-        this.setup = setup;
-        this.id = id;
-        schemaRegistry = setup.getSchemaResourcesDTO().getSchemaRegistry();
-        schemaRepository = setup.getSchemaResourcesDTO().getSchemaRepository();
+            final Timeout actorResponseWaitTime) {
+        this.setup = requireNonNull(setup);
+        this.id = requireNonNull(id);
         this.actorResponseWaitTime = actorResponseWaitTime;
     }
 
@@ -33,18 +29,10 @@ public class RefreshSlaveActor {
         return actorResponseWaitTime;
     }
 
-    public SchemaRepository getSchemaRepository() {
-        return schemaRepository;
-    }
-
     public RemoteDeviceId getId() {
         return id;
     }
 
-    public SchemaSourceRegistry getSchemaRegistry() {
-        return schemaRegistry;
-    }
-
     public NetconfTopologySetup getSetup() {
         return setup;
     }