|
ref_send API 2.17 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<? extends T> promise)
Resolve the corresponding promise to the given promise. |
| Method Detail |
|---|
void progress()
void 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<? extends T> promise)
promise - promise to forward requests tovoid apply(T referent)
apply in interface Receiver<T>referent - reference to forward requests to
|
ref_send API 2.17 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.