import io.netty.channel.Channel;
import io.netty.util.concurrent.Promise;
-import java.io.IOException;
import org.opendaylight.netconf.nettyutil.AbstractChannelInitializer;
import org.opendaylight.netconf.nettyutil.handler.ssh.authentication.AuthenticationHandler;
import org.opendaylight.netconf.nettyutil.handler.ssh.client.AsyncSshHandler;
@Override
public void initialize(final Channel ch, final Promise<NetconfClientSession> promise) {
- try {
- // ssh handler has to be the first handler in pipeline
- ch.pipeline().addFirst(AsyncSshHandler.createForNetconfSubsystem(authenticationHandler, promise));
- super.initialize(ch, promise);
- } catch (final IOException e) {
- throw new RuntimeException(e);
- }
+ // ssh handler has to be the first handler in pipeline
+ ch.pipeline().addFirst(AsyncSshHandler.createForNetconfSubsystem(authenticationHandler, promise));
+ super.initialize(ch, promise);
}
@Override