/** * Successfully resolve the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified value, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param value The value of the resolved Promise. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void resolve(T value) { promise.resolve(value, null); }
/** * Successfully resolve the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified value, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param value The value of the resolved Promise. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void resolve(T value) { promise.resolve(value, null); }
/** * Successfully resolve the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified value, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param value The value of the resolved Promise. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void resolve(T value) { promise.resolve(value, null); }
/** * Successfully resolve the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified value, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param value The value of the resolved Promise. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void resolve(T value) { promise.resolve(value, null); }
/** * Successfully resolve the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified value, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param value The value of the resolved Promise. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void resolve(T value) { promise.resolve(value, null); }
/** * Successfully resolve the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified value, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param value The value of the resolved Promise. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void resolve(T value) { promise.resolve(value, null); }
/** * Successfully resolve the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified value, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param value The value of the resolved Promise. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void resolve(T value) { promise.resolve(value, null); }
/** * Fail the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified failure, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param failure The failure of the resolved Promise. Must not be * {@code null}. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void fail(Throwable failure) { promise.resolve(null, requireNonNull(failure)); }
/** * Fail the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified failure, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param failure The failure of the resolved Promise. Must not be * {@code null}. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void fail(Throwable failure) { promise.resolve(null, requireNonNull(failure)); }
/** * Fail the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified failure, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param failure The failure of the resolved Promise. Must not be * {@code null}. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void fail(Throwable failure) { promise.resolve(null, requireNonNull(failure)); }
/** * Fail the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified failure, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param failure The failure of the resolved Promise. Must not be * {@code null}. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void fail(Throwable failure) { promise.resolve(null, requireNonNull(failure)); }
/** * Fail the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified failure, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param failure The failure of the resolved Promise. Must not be * {@code null}. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void fail(Throwable failure) { promise.resolve(null, requireNonNull(failure)); }
/** * Fail the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified failure, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param failure The failure of the resolved Promise. Must not be * {@code null}. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void fail(Throwable failure) { promise.resolve(null, requireNonNull(failure)); }
/** * Fail the Promise associated with this Deferred. * * <p> * After the associated Promise is resolved with the specified failure, all * registered {@link Promise#onResolve(Runnable) callbacks} are called and * any {@link Promise#then(Success, Failure) chained} Promises are resolved. * This may occur asynchronously to this method. * <p> * Resolving the associated Promise <i>happens-before</i> any registered * callback is called. That is, in a registered callback, * {@link Promise#isDone()} must return {@code true} and * {@link Promise#getValue()} and {@link Promise#getFailure()} must not * block. * * @param failure The failure of the resolved Promise. Must not be * {@code null}. * @throws IllegalStateException If the associated Promise was already * resolved. */ public void fail(Throwable failure) { promise.resolve(null, requireNonNull(failure)); }