|
ref_send API 2.9 defensive programming in Java |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - promised referent typepublic interface Resolver<T>
A Promise resolver.
| Method Summary | |
|---|---|
void |
apply(T referent)
Resolve the corresponding promise to the given reference. |
void |
progress()
Logs progress towards resolution. |
void |
reject(java.lang.Exception reason)
Put the corresponding promise in the rejected state. |
void |
resolve(Promise<T> promise)
Resolve the corresponding promise to the given promise. |
| Method Detail |
|---|
void apply(T referent)
This method is syntactic sugar for:
resolve(ref(referent));
apply in interface Receiver<T>referent - resolved value of the corresponding promisevoid reject(java.lang.Exception reason)
This method is syntactic sugar for:
resolve(reject(reason));
reason - reason the corresponding promise will not be fulfilledvoid resolve(Promise<T> promise)
promise - promise to forward requests tovoid progress()
|
ref_send API 2.9 defensive programming in Java |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.