X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fclient%2FSshClientChannelInitializer.java;h=87b3f837e8c43a25f74f78cfbdd0b425bd8d94e9;hp=799674487f4de5d936067b51b3f9ae392caee897;hb=3d81e6fb622fb7d5b239a8697d51bcb6d96658db;hpb=b80124e3f7b11cf2f5e5bd4a6b033d855ff4d0d4 diff --git a/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/SshClientChannelInitializer.java b/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/SshClientChannelInitializer.java index 799674487f..87b3f837e8 100644 --- a/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/SshClientChannelInitializer.java +++ b/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/SshClientChannelInitializer.java @@ -7,13 +7,12 @@ */ package org.opendaylight.controller.netconf.client; -import io.netty.channel.socket.SocketChannel; +import io.netty.channel.Channel; import io.netty.util.concurrent.Promise; import java.io.IOException; import org.opendaylight.controller.netconf.nettyutil.AbstractChannelInitializer; -import org.opendaylight.controller.netconf.nettyutil.handler.ssh.SshHandler; import org.opendaylight.controller.netconf.nettyutil.handler.ssh.authentication.AuthenticationHandler; -import org.opendaylight.controller.netconf.nettyutil.handler.ssh.client.Invoker; +import org.opendaylight.controller.netconf.nettyutil.handler.ssh.client.SshHandler; import org.opendaylight.protocol.framework.SessionListenerFactory; final class SshClientChannelInitializer extends AbstractChannelInitializer { @@ -31,10 +30,9 @@ final class SshClientChannelInitializer extends AbstractChannelInitializer promise) { + public void initialize(final Channel ch, final Promise promise) { try { - final Invoker invoker = Invoker.subsystem("netconf"); - ch.pipeline().addFirst(new SshHandler(authenticationHandler, invoker)); + ch.pipeline().addFirst(SshHandler.createForNetconfSubsystem(authenticationHandler)); super.initialize(ch,promise); } catch (final IOException e) { throw new RuntimeException(e); @@ -42,7 +40,7 @@ final class SshClientChannelInitializer extends AbstractChannelInitializer promise) { ch.pipeline().addAfter(NETCONF_MESSAGE_DECODER, AbstractChannelInitializer.NETCONF_SESSION_NEGOTIATOR, negotiatorFactory.getSessionNegotiator(new SessionListenerFactory() {