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%2FNetconfSshClientDispatcher.java;h=ee07b3949d6dd2f040da183a46dde263abe6d9af;hb=1ff9939abc7a4072b07df6b79516fe344b1b42e3;hp=4de6cc35c0dad3f00afe949821a1dab59f4bc3da;hpb=c73c1861af3d5eaab53843a82f021ccedac4a0f0;p=controller.git diff --git a/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfSshClientDispatcher.java b/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfSshClientDispatcher.java index 4de6cc35c0..ee07b3949d 100644 --- a/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfSshClientDispatcher.java +++ b/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfSshClientDispatcher.java @@ -14,8 +14,10 @@ import io.netty.channel.socket.SocketChannel; import io.netty.util.HashedWheelTimer; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.Promise; + import java.io.IOException; import java.net.InetSocketAddress; + import org.opendaylight.controller.netconf.api.NetconfMessage; import org.opendaylight.controller.netconf.api.NetconfSession; import org.opendaylight.controller.netconf.api.NetconfTerminationReason; @@ -31,6 +33,8 @@ import org.opendaylight.protocol.framework.ReconnectStrategy; import org.opendaylight.protocol.framework.SessionListener; import org.opendaylight.protocol.framework.SessionListenerFactory; +import com.google.common.base.Optional; + public class NetconfSshClientDispatcher extends NetconfClientDispatcher { private AuthenticationHandler authHandler; @@ -42,7 +46,15 @@ public class NetconfSshClientDispatcher extends NetconfClientDispatcher { super(bossGroup, workerGroup); this.authHandler = authHandler; this.timer = new HashedWheelTimer(); - this.negotatorFactory = new NetconfClientSessionNegotiatorFactory(timer); + this.negotatorFactory = new NetconfClientSessionNegotiatorFactory(timer, Optional.absent()); + } + + public NetconfSshClientDispatcher(AuthenticationHandler authHandler, EventLoopGroup bossGroup, + EventLoopGroup workerGroup, String additionalHeader) { + super(bossGroup, workerGroup, additionalHeader); + this.authHandler = authHandler; + this.timer = new HashedWheelTimer(); + this.negotatorFactory = new NetconfClientSessionNegotiatorFactory(timer, Optional.of(additionalHeader)); } public Future createClient(InetSocketAddress address,