code: public static SslHandler createSslHandler(final boolean clientMode) {
          final SSLEngine engine = createEngine(clientMode);
          final SslHandler handler = new SslHandler(engine);
          handler.handshakeFuture().addListener(new GenericFutureListener<Future<? super Channel>>() {
              @Override
              public void operationComplete(final Future<? super Channel> future) throws Exception {
                  LOG.debug("Using cipher " + engine.getSession().getCipherSuite()
                          + " for the encrypted connection to the server.");
              }
          });
          return handler;
      }
docs: Creates a new {@link SslHandler} in client or server mode.
  
  @param clientMode if <code>true</code> a client engine is created, if <code>false</code> a server engine.
  @return The new handler