|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the type of the resultpublic interface AsyncResult<T>
AsyncResult represents a result that may have not been determined yet. It is the return type for all Message methods.
| Nested Class Summary | |
|---|---|
static interface |
AsyncResult.Notifier<T>
Implement this interface to receive a notification when the result is ready. |
| Method Summary | |
|---|---|
void |
addNotifier(AsyncResult.Notifier<T> notifier)
Adds the given Notifier to the AsyncResult. |
void |
await()
Blocks until the AsyncResult is ready. |
T |
get()
Waits until the result is ready, and then returns it. |
Throwable |
getException()
Checks whether the result is ready but the implementation threw an exception. |
boolean |
isReady()
Checks whether a result (value or exception) is ready. |
void |
removeNotifier(AsyncResult.Notifier<T> notifier)
Removes the given Notifier from the AsyncResult. |
| Method Detail |
|---|
T get()
WrappedException - if the message implementation threw a non-RuntimeException that
needs to be declared
RuntimeException - if the message implementation threw an exceptionawait(),
addNotifier(org.actorsguildframework.AsyncResult.Notifier)void await()
addNotifier(org.actorsguildframework.AsyncResult.Notifier),
isReady(),
DefaultAgent.awaitAll(AsyncResult...),
DefaultAgent.awaitAny(AsyncResult...)boolean isReady()
await()Throwable getException()
void addNotifier(AsyncResult.Notifier<T> notifier)
notifier - the notifier to be called
IllegalArgumentException - if the notifier was nullremoveNotifier(org.actorsguildframework.AsyncResult.Notifier)void removeNotifier(AsyncResult.Notifier<T> notifier)
notifier - the notifier to be called
IllegalArgumentException - if the notifier was nulladdNotifier(org.actorsguildframework.AsyncResult.Notifier)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||