Attempt netconf remount regardless of error-type
[netconf.git] / netconf / sal-netconf-connector / src / main / java / org / opendaylight / netconf / sal / connect / api / RemoteDeviceHandler.java
index 5db885e77e6665b7af713cdac53ac9383bbe6b0c..9ab98f6428dc063c074bedf7bb6f3514bb834069 100644 (file)
@@ -7,9 +7,10 @@
  */
 package org.opendaylight.netconf.sal.connect.api;
 
-import org.opendaylight.controller.md.sal.dom.api.DOMActionService;
-import org.opendaylight.controller.md.sal.dom.api.DOMNotification;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
+import org.opendaylight.mdsal.dom.api.DOMActionService;
+import org.opendaylight.mdsal.dom.api.DOMNotification;
+import org.opendaylight.mdsal.dom.api.DOMRpcService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 public interface RemoteDeviceHandler<PREF> extends AutoCloseable {
@@ -21,8 +22,8 @@ public interface RemoteDeviceHandler<PREF> extends AutoCloseable {
      * @param netconfSessionPreferences - session of device
      * @param deviceRpc - {@link DOMRpcService} of device
      */
-    default void onDeviceConnected(SchemaContext remoteSchemaContext, PREF netconfSessionPreferences,
-            DOMRpcService deviceRpc) {
+    default void onDeviceConnected(final SchemaContext remoteSchemaContext, final PREF netconfSessionPreferences,
+            final DOMRpcService deviceRpc) {
         // DO NOTHING
     }
 
@@ -34,8 +35,12 @@ public interface RemoteDeviceHandler<PREF> extends AutoCloseable {
      * @param deviceRpc - {@link DOMRpcService} of device
      * @param deviceAction - {@link DOMActionService} of device
      */
-    default void onDeviceConnected(SchemaContext remoteSchemaContext, PREF netconfSessionPreferences,
-            DOMRpcService deviceRpc, DOMActionService deviceAction) {
+    default void onDeviceConnected(final SchemaContext remoteSchemaContext, final PREF netconfSessionPreferences,
+            final DOMRpcService deviceRpc, final DOMActionService deviceAction) {
+        // DO NOTHING
+    }
+
+    default void onDeviceReconnected(final PREF netconfSessionPreferences, final NetconfNode node) {
         // DO NOTHING
     }
 
@@ -45,5 +50,6 @@ public interface RemoteDeviceHandler<PREF> extends AutoCloseable {
 
     void onNotification(DOMNotification domNotification);
 
+    @Override
     void close();
 }