Remove old AbstractNetconfDispatcher.getReconnectingClient() 03/96903/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 16 Jul 2021 12:52:14 +0000 (14:52 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 16 Jul 2021 12:52:14 +0000 (14:52 +0200)
This method is not used anywhere, remove it. Also deprecate the
corresponding re-establishment policy, as it is no longer used.

Change-Id: I89b5ebf3197e8d459501b11433f3c9eaa3845281
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/NetconfClientDispatcherImpl.java
netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/conf/NetconfClientConfiguration.java
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfDispatcher.java

index 747a5f75fd72750dbb36353511d7deab60dd6d90..df4ee5eeb7cde408d8f2384db9d5790f5a143fbf 100644 (file)
@@ -80,9 +80,8 @@ public class NetconfClientDispatcherImpl
                 new TcpClientChannelInitializer(getNegotiatorFactory(currentConfiguration),
                 currentConfiguration.getSessionListener());
 
-        return super.createReconnectingClient(currentConfiguration.getAddress(), currentConfiguration
-                .getConnectStrategyFactory(),
-                currentConfiguration.getReconnectStrategy(), init::initialize);
+        return super.createReconnectingClient(currentConfiguration.getAddress(),
+                currentConfiguration.getConnectStrategyFactory(), init::initialize);
     }
 
     private Future<NetconfClientSession> createSshClient(final NetconfClientConfiguration currentConfiguration) {
@@ -100,9 +99,8 @@ public class NetconfClientDispatcherImpl
                 getNegotiatorFactory(currentConfiguration), currentConfiguration.getSessionListener(),
                 currentConfiguration.getSshClient());
 
-        return super.createReconnectingClient(currentConfiguration.getAddress(), currentConfiguration
-                .getConnectStrategyFactory(), currentConfiguration.getReconnectStrategy(),
-                init::initialize);
+        return super.createReconnectingClient(currentConfiguration.getAddress(),
+                currentConfiguration.getConnectStrategyFactory(), init::initialize);
     }
 
     private Future<NetconfClientSession> createTlsClient(final NetconfClientConfiguration currentConfiguration) {
@@ -120,9 +118,8 @@ public class NetconfClientDispatcherImpl
                 currentConfiguration.getSslHandlerFactory(), getNegotiatorFactory(currentConfiguration),
                 currentConfiguration.getSessionListener());
 
-        return super.createReconnectingClient(currentConfiguration.getAddress(), currentConfiguration
-                .getConnectStrategyFactory(), currentConfiguration.getReconnectStrategy(),
-                init::initialize);
+        return super.createReconnectingClient(currentConfiguration.getAddress(),
+                currentConfiguration.getConnectStrategyFactory(), init::initialize);
     }
 
     protected NetconfClientSessionNegotiatorFactory getNegotiatorFactory(final NetconfClientConfiguration cfg) {
index ecdfaac1c901939d7aea7018747964e7c3053054..b61ccbbd17524bce0ce7d74956dfa92dcf759d55 100644 (file)
@@ -79,6 +79,7 @@ public class NetconfClientConfiguration {
         return sessionListener;
     }
 
+    @Deprecated(forRemoval = true)
     public final ReconnectStrategy getReconnectStrategy() {
         return reconnectStrategy;
     }
index c4e3b479789b0f3b13e991dda1a3ebf0d1e5027e..bbddb1d0c5afaa94364d59881094561a4c83eae4 100644 (file)
@@ -212,25 +212,6 @@ public abstract class AbstractNetconfDispatcher<S extends NetconfSession, L exte
         return p;
     }
 
-    /**
-     * Creates a client.
-     *
-     * @param address remote address
-     * @param connectStrategyFactory Factory for creating reconnection strategy to be used when initial connection fails
-     * @param reestablishStrategy Reconnection strategy to be used when the already-established session fails
-     * @return Future representing the reconnection task. It will report completion based on reestablishStrategy, e.g.
-     *         success if it indicates no further attempts should be made and failure if it reports an error
-     * @deprecated Use
-     *             {@link #createReconnectingClient(InetSocketAddress, ReconnectStrategyFactory, PipelineInitializer)}
-     *             instead.
-     */
-    @Deprecated
-    protected Future<Void> createReconnectingClient(final InetSocketAddress address,
-            final ReconnectStrategyFactory connectStrategyFactory, final ReconnectStrategy reestablishStrategy,
-            final PipelineInitializer<S> initializer) {
-        return createReconnectingClient(address, connectStrategyFactory, initializer);
-    }
-
     /**
      * Creates a reconnecting client.
      *