|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the type held by the future.public interface FutureListener<T>
A future listener to receive an event when a Future has reached the completed termination state of normal termination, an exception or cancellation.
| Method Summary | |
|---|---|
void |
onComplete(java.util.concurrent.Future<T> f)
Invoked when a Future has reached the completed termination state. |
| Method Detail |
|---|
void onComplete(java.util.concurrent.Future<T> f)
throws java.lang.InterruptedException
The catching of a ExecutionException when
Future.get is invoked may be utilized to determine if the
future terminated with an exception. The exception can be obtained
by invoking Throwable.getCause().
The catching of a CancellationException when
Future.get is invoked may be utilized to determine if the
future terminated with a cancellation.
f - the completed Future. Invocation of Future.isDone()
will return true. Since the future is complete invocation of
Future.get() and Future.get(long, java.util.concurrent.TimeUnit)
will not result in the throwing of an InterruptedException.
java.lang.InterruptedException - this exception is declared so that the
developer does not need to catch it when invoking
Future.get.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||