code: public static ConnectFuture newFailedFuture(Throwable exception) {
          DefaultConnectFuture failedFuture = new DefaultConnectFuture();
          failedFuture.setException(exception);
          return failedFuture;
      }
docs: Returns a new {@link ConnectFuture} which is already marked as 'failed to connect'.