Codota Logo
Promise$PromiseExecutorCallbackFn$RejectCallbackFn
Code IndexAdd Codota to your IDE (free)

How to use
Promise$PromiseExecutorCallbackFn$RejectCallbackFn
in
elemental2.promise

Best Java code snippets using elemental2.promise.Promise$PromiseExecutorCallbackFn$RejectCallbackFn (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

Promise<Boolean> validateStringIsNotEmpty(final String string,
                     final String errorMessage) {
  return promises.create((resolve, reject) -> {
    if (string == null || string.isEmpty()) {
      reject.onInvoke(errorMessage);
    } else {
      resolve.onInvoke(true);
    }
  });
}
origin: org.uberfire/uberfire-client-api

private <M> ErrorCallback<M> defaultRpcErrorCallback(final Promise.PromiseExecutorCallbackFn.RejectCallbackFn reject) {
  return (final M o, final Throwable throwable) -> {
    reject.onInvoke(new Promises.Error<>(o, throwable));
    return false;
  };
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Override
public Promise<Void> save(final String comment,
             final Supplier<Promise<Void>> chain) {
  return promises.create((resolve, reject) -> {
    gavPreferences.save(projectScopedResolutionStrategySupplier.get(),
              () -> resolve.onInvoke(promises.resolve()),
              (throwable) -> reject.onInvoke(this));
  });
}
origin: kiegroup/appformer

private <M> ErrorCallback<M> defaultRpcErrorCallback(final Promise.PromiseExecutorCallbackFn.RejectCallbackFn reject) {
  return (final M o, final Throwable throwable) -> {
    reject.onInvoke(new Promises.Error<>(o, throwable));
    return false;
  };
}
origin: kiegroup/appformer

@Override
@SuppressWarnings("unchecked")
public <V> Promise<V> catch_(final CatchOnRejectedCallbackFn<? extends V> onRejected) {
  try {
    if (status == REJECTED) {
      return (SyncPromise<V>) onRejected.onInvoke(this.value);
    } else {
      return new SyncPromise<>((res, rej) -> res.onInvoke((V) value));
    }
  } catch (final Exception e) {
    return new SyncPromise<>((res, rej) -> rej.onInvoke(e));
  }
}
origin: kiegroup/appformer

@Override
@SuppressWarnings("unchecked")
public <V> Promise<V> then(final ThenOnFulfilledCallbackFn<? super T, ? extends V> onFulfilled) {
  try {
    if (status == RESOLVED) {
      return (SyncPromise<V>) onFulfilled.onInvoke(value);
    } else {
      return new SyncPromise<>((res, rej) -> rej.onInvoke(value));
    }
  } catch (final Exception e) {
    return new SyncPromise<>((res, rej) -> rej.onInvoke(e));
  }
}
origin: org.uberfire/uberfire-client-api

public <T> Promise<T> reject(final Object object) {
  return create((resolve, reject) -> reject.onInvoke(object));
}
origin: kiegroup/appformer

public <T> Promise<T> reject(final Object object) {
  return create((resolve, reject) -> reject.onInvoke(object));
}
elemental2.promisePromise$PromiseExecutorCallbackFn$RejectCallbackFn

Most used methods

  • onInvoke

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JTable (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now