X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fclient%2FNetconfClient.java;h=95f526b2ecb535787570fd60fe97e96094421420;hb=03abf047ba966c53f4901d36ae5198156d66dc05;hp=d95977492a9206fb0ff05d4e6229810b08dcda9a;hpb=fcccbe2ab580850a63bb25d657bd10ef424b7614;p=controller.git diff --git a/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClient.java b/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClient.java index d95977492a..95f526b2ec 100644 --- a/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClient.java +++ b/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClient.java @@ -67,6 +67,10 @@ public class NetconfClient implements Closeable { } } + public static NetconfClient clientFor(String clientLabelForLogging, InetSocketAddress address, ReconnectStrategy strat, NetconfClientDispatcher netconfClientDispatcher) throws InterruptedException { + return new NetconfClient(clientLabelForLogging,address,strat,netconfClientDispatcher); + } + public NetconfClient(String clientLabelForLogging, InetSocketAddress address, int connectTimeoutMs, NetconfClientDispatcher netconfClientDispatcher) throws InterruptedException { this(clientLabelForLogging, address, @@ -100,6 +104,10 @@ public class NetconfClient implements Closeable { clientSession.close(); } + public NetconfClientDispatcher getNetconfClientDispatcher() { + return dispatch; + } + private static ReconnectStrategy getReconnectStrategy(int connectionAttempts, int attemptMsTimeout) { return new TimedReconnectStrategy(GlobalEventExecutor.INSTANCE, attemptMsTimeout, 1000, 1.0, null, Long.valueOf(connectionAttempts), null);