code: @Override
      public IPromise<T> onResult(Consumer<T> resultHandler) {
          return then( (r,e) -> {
              if ( e == null ) {
                  resultHandler.accept((T) r);
              }
          });
      }
docs: see IPromise (inheriting Callback) interface