code: public static <R> AsyncCallback<R> build(final AsyncCallbackOnSuccess<R> pcallbackOnSuccess,
        final AsyncCallbackOnFailure pcallbackOnFailure) {
      return new AsyncCallback<R>() {
  
        @Override
        public void onFailure(final Throwable pcaught) {
          pcallbackOnFailure.onFailure(pcaught);
        }
  
        @Override
        public void onSuccess(final R presult) {
          pcallbackOnSuccess.onSuccess(presult);
        }
      };
    }
docs: create rest callback implementation.
  
  @param pcallbackOnSuccess on success callback
  @param pcallbackOnFailure on failure callback
  @param <R> rest result type
  @return RestCallbackImpl