The deferred class is the primary implementation of the
Promise
interface.
The promise is accessible using the promise
attribute of
the deferred.
The deferred can either be fulfilled or rejected via the
Completable.fulfill()
or Completable.reject()
methods. Both
methods accept an argument or a promise to the argument,
allowing the deferred to react on a promise.
no subtypes hierarchy
Initializer |
Deferred(ExecutionContext context = ...) Parameters:
|
Attributes | |
promise | Source Codeshared actual promise promise The promise of this deferred. Refines Promised.promise |
Inherited Attributes |
Attributes inherited from: Object |
Attributes inherited from: Promised<Value> |
Methods | |
fulfill | Source Codeshared actual void fulfill(Value|Promise<Value> val) Fulfills the promise with a value or a promise to the value. Refines Completable.fulfill |
reject | Source Codeshared actual void reject(Throwable reason) Rejects the promise with a reason. Refines Completable.reject |
Inherited Methods |
Methods inherited from: Object |
Methods inherited from: Completable<Value> |
Nested Classes | |
promise | Source Codeshared actual promise The promise of this deferred. |