Merge "Remove the need for synthetic methods"
[netconf.git] / netconf / sal-netconf-connector / src / main / java / org / opendaylight / netconf / sal / connect / netconf / sal / KeepaliveSalFacade.java
index 2e33b57beb86f484d147b43d3982c74a7d397cd4..428a9b7fa1931ff3236f5510b7727d5671b6e1a3 100644 (file)
@@ -97,7 +97,7 @@ public final class KeepaliveSalFacade implements RemoteDeviceHandler<NetconfSess
      * <p>
      * Then schedule next keepalive.
      */
-    private void resetKeepalive() {
+    void resetKeepalive() {
         LOG.trace("{}: Resetting netconf keepalive timer", id);
         if (currentKeepalive != null) {
             currentKeepalive.cancel(false);
@@ -115,7 +115,7 @@ public final class KeepaliveSalFacade implements RemoteDeviceHandler<NetconfSess
         currentDeviceRpc = null;
     }
 
-    private void reconnect() {
+    void reconnect() {
         Preconditions.checkState(listener != null, "%s: Unable to reconnect, session listener is missing", id);
         stopKeepalives();
         LOG.info("{}: Reconnecting inactive netconf session", id);
@@ -266,7 +266,7 @@ public final class KeepaliveSalFacade implements RemoteDeviceHandler<NetconfSess
      * DOMRpcService proxy that attaches reset-keepalive-task and schedule
      * request-timeout-task to each RPC invocation.
      */
-    private static final class KeepaliveDOMRpcService implements DOMRpcService {
+    public static final class KeepaliveDOMRpcService implements DOMRpcService {
 
         private final DOMRpcService deviceRpc;
         private ResetKeepalive resetKeepaliveTask;
@@ -281,6 +281,10 @@ public final class KeepaliveSalFacade implements RemoteDeviceHandler<NetconfSess
             this.executor = executor;
         }
 
+        public DOMRpcService getDeviceRpc() {
+            return deviceRpc;
+        }
+
         @Nonnull
         @Override
         public CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@Nonnull final SchemaPath type,