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=b8951a4789e1f1b4bc305cf6ed0c824a8e960ccf;hb=3948bedd0129e44c0943bd77c91806425645cd72;hp=4fcad2cbd6afef217f32d23f71383f13f277414c;hpb=31ea7166f7cf572b3d2c51e2749bb94e8f8af821;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 4fcad2cbd6..b8951a4789 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 @@ -61,18 +61,18 @@ public class NetconfClient implements Closeable { try { return clientFuture.get(); } catch (CancellationException e) { - throw new RuntimeException("Netconf client interrupted", e); + throw new RuntimeException("Cancelling " + this, e); } catch (ExecutionException e) { - throw new IllegalStateException("Unable to create netconf client", e); + throw new IllegalStateException("Unable to create " + this, e); } } - public static NetconfClient clientFor(String clientLabelForLogging, InetSocketAddress address, ReconnectStrategy strat, NetconfClientDispatcher netconfClientDispatcher) throws InterruptedException { - return new NetconfClient(clientLabelForLogging,address,strat,netconfClientDispatcher); + public static NetconfClient clientFor(String clientLabelForLogging, InetSocketAddress address, ReconnectStrategy strategy, NetconfClientDispatcher netconfClientDispatcher) throws InterruptedException { + return new NetconfClient(clientLabelForLogging,address,strategy,netconfClientDispatcher); } - public static NetconfClient clientFor(String clientLabelForLogging, InetSocketAddress address, ReconnectStrategy strat, NetconfClientDispatcher netconfClientDispatcher,NetconfClientSessionListener listener) throws InterruptedException { - return new NetconfClient(clientLabelForLogging,address,strat,netconfClientDispatcher,listener); + public static NetconfClient clientFor(String clientLabelForLogging, InetSocketAddress address, ReconnectStrategy strategy, NetconfClientDispatcher netconfClientDispatcher,NetconfClientSessionListener listener) throws InterruptedException { + return new NetconfClient(clientLabelForLogging,address,strategy,netconfClientDispatcher,listener); } public NetconfClient(String clientLabelForLogging, InetSocketAddress address, int connectTimeoutMs, @@ -87,12 +87,12 @@ public class NetconfClient implements Closeable { DEFAULT_CONNECT_TIMEOUT), netconfClientDispatcher); } - public NetconfClient(String clientLabelForLogging, InetSocketAddress address, ReconnectStrategy strat, + public NetconfClient(String clientLabelForLogging, InetSocketAddress address, ReconnectStrategy strategy, NetconfClientDispatcher netconfClientDispatcher, NetconfClientSessionListener listener) throws InterruptedException{ this.label = clientLabelForLogging; dispatch = netconfClientDispatcher; sessionListener = listener; - Future clientFuture = dispatch.createClient(address, sessionListener, strat); + Future clientFuture = dispatch.createClient(address, sessionListener, strategy); this.address = address; clientSession = get(clientFuture); this.sessionId = clientSession.getSessionId();