X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fclient%2FSshClientChannelInitializer.java;h=81f2d00b9724222973af2bea2ce6f39f788cdcc5;hb=50aba4430f250f89dcd59a480cef5980475a70cd;hp=53d9a27c962987a80d0ebc844aa213fbe3ccaf5d;hpb=57bfa6dd35ae51496e2c1aecd2ef7755b5203cba;p=netconf.git diff --git a/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SshClientChannelInitializer.java b/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SshClientChannelInitializer.java index 53d9a27c96..81f2d00b97 100644 --- a/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SshClientChannelInitializer.java +++ b/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SshClientChannelInitializer.java @@ -10,23 +10,19 @@ package org.opendaylight.netconf.client; import io.netty.channel.Channel; import io.netty.util.concurrent.Promise; import org.eclipse.jdt.annotation.Nullable; -import org.opendaylight.netconf.nettyutil.AbstractChannelInitializer; import org.opendaylight.netconf.nettyutil.handler.ssh.authentication.AuthenticationHandler; import org.opendaylight.netconf.nettyutil.handler.ssh.client.AsyncSshHandler; import org.opendaylight.netconf.nettyutil.handler.ssh.client.NetconfSshClient; -final class SshClientChannelInitializer extends AbstractChannelInitializer { +final class SshClientChannelInitializer extends AbstractClientChannelInitializer { private final AuthenticationHandler authenticationHandler; - private final NetconfClientSessionNegotiatorFactory negotiatorFactory; - private final NetconfClientSessionListener sessionListener; private final NetconfSshClient sshClient; SshClientChannelInitializer(final AuthenticationHandler authHandler, final NetconfClientSessionNegotiatorFactory negotiatorFactory, final NetconfClientSessionListener sessionListener, @Nullable final NetconfSshClient sshClient) { - this.authenticationHandler = authHandler; - this.negotiatorFactory = negotiatorFactory; - this.sessionListener = sessionListener; + super(negotiatorFactory, sessionListener); + authenticationHandler = authHandler; this.sshClient = sshClient; } @@ -42,12 +38,4 @@ final class SshClientChannelInitializer extends AbstractChannelInitializer promise) { - ch.pipeline().addAfter(NETCONF_MESSAGE_DECODER, AbstractChannelInitializer.NETCONF_SESSION_NEGOTIATOR, - negotiatorFactory.getSessionNegotiator(() -> sessionListener, ch, promise)); - ch.config().setConnectTimeoutMillis((int)negotiatorFactory.getConnectionTimeoutMillis()); - } }