@Override
      public void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();
        if (sslFactory != null) {
          pipeline.addLast("sslHandler",
              new SslHandler(sslFactory.createSSLEngine(hostname, port, SSLFactory.Mode.CLIENT)));
        }
        pipeline.addLast(new HttpClientCodec()).addLast(new ChunkedWriteHandler()).addLast(communicationHandler);
      }
Create a NettyClient.
@param hostname the host to connect to.
@param port the port to connect to.
@param sslFactory the {@link SSLFactory} to use if SSL is enabled.
ambry-test-utils/src/main/java/com/github/ambry/rest/NettyClient.java