code: @Override
      public IPromise<T> onResult(Consumer<T> resultHandler) {
          if (realCallback instanceof IPromise == false)
              throw new RuntimeException("this is an error.");
          else
              return ((IPromise)realCallback).onResult(resultHandler);
      }
docs: Warning: this will not be called on error or timeout
  
  @param resultHandler
  @return