This class is not used directly by clients. Clients should use
PromiseFactory#deferred() to create a Deferred which can be
used to obtain a Promise whose resolution can be deferred.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | DeferredPromiseImpl.
A callback used to resolve the chained Promise when the Promise is resolved. |
| private class | DeferredPromiseImpl.
A callback used to resolve the chained Promise when the PromiseImpl is resolved. |
| pack-priv class | DeferredPromiseImpl.
A callback used by the |
| private class | DeferredPromiseImpl.
A callback used to resolve the chained Promise when the fallback Promise is resolved. |
| pack-priv class | DeferredPromiseImpl.
A callback used by the |
| pack-priv class | DeferredPromiseImpl.
A callback used by the |
| pack-priv class | |
| pack-priv class | |
| pack-priv class | DeferredPromiseImpl.
A callback used by the |
| pack-priv class | DeferredPromiseImpl.
A callback used by the |
| private class | DeferredPromiseImpl.
A callback used to resolve a Promise with another Promise for the
|
| pack-priv class | DeferredPromiseImpl.
A callback used by the |
| pack-priv class | DeferredPromiseImpl.
A callback used to chain promises for the
|
| pack-priv class | DeferredPromiseImpl.
A callback used by the |
| pack-priv class | DeferredPromiseImpl.
A callback used by the |
| Modifier and Type | Field and Description |
|---|---|
| private Throwable | fail
The failure of this Promise if resolved with a failure or |
| private final CountDownLatch | resolved
A CountDownLatch to manage the resolved state of this Promise. |
| private T | value
The value of this Promise if successfully resolved. |
| Access | Constructor and Description |
|---|---|
| pack-priv | DeferredPromiseImpl(PromiseFactory
The factory to use for callbacks and scheduled operations. factory)Initialize this Promise. |
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | getFailure()
Implements org. Returns the failure of this Promise. |
| public T | |
| public boolean | isDone()
Implements org. Returns whether this Promise has been resolved. |
| pack-priv PromiseImpl | Returns: A ResolvedPromiseImpl holding the value of this DeferredPromiseImpl or a FailedPromiseImpl holding the failure of this DeferredPromiseImpl or this DeferredPromiseImpl if this DeferredPromiseImpl is not resolved.Return a resolved PromiseImpl if this DeferredPromiseImpl is resolved. |
| pack-priv void | |
| pack-priv Promise | Returns: A Promise that is resolved only when this Promise is resolved by the specified Promise. The returned Promise must be successfully resolved with the valuenull, if this Promise was
resolved by the specified Promise. The returned Promise must be
resolved with a failure of IllegalStateException, if this
Promise was already resolved when the specified Promise was
resolved.A Promise whose value or failure must be used to resolve this
Promise. Must not be with)null.Resolve this Promise with the specified Promise. |
| pack-priv Promise | Returns: A Promise that is resolved only when this Promise is resolved by the specified CompletionStage. The returned Promise must be successfully resolved with the valuenull, if this
Promise was resolved by the specified CompletionStage. The
returned Promise must be resolved with a failure of
IllegalStateException, if this Promise was already
resolved when the specified CompletionStage was completed.A CompletionStage whose result will be used to resolve this
Promise. Must not be with)null.Resolve this Promise with the specified CompletionStage. |
| pack-priv void | result(PromiseImpl.
Implements abstract org. Accept the result of this PromiseImpl. |
| public String | |
| pack-priv boolean | Returns: false if this Promise was already resolved; true if this method resolved this Promise.The value of this Promise. v, Throwable The failure of this Promise. f)Try to resolve this Promise. |