code: @Override
      protected final void finishSessionInitialization0(
              final IoSession session, IoFuture future) {
          // In case that ConnectFuture.cancel() is invoked before
          // setSession() is invoked, add a listener that closes the
          // connection immediately on cancellation.
          future.addListener(new IoFutureListener<ConnectFuture>() {
              @Override
              public void operationComplete(ConnectFuture future) {
                  if (future.isCanceled()) {
                      session.close(true);
                  }
              }
          });
      }
docs: Adds required internal attributes and {@link IoFutureListener}s
  related with event notifications to the specified {@code session}
  and {@code future}.  Do not call this method directly;
  {@link #finishSessionInitialization(IoSession, IoFuture, IoSessionInitializer)}
  will call this method instead.