|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.util.AbstractCompletionFuture<T>
T - the future's result typepublic abstract class AbstractCompletionFuture<T>
This future is an abstract implementation for the futures
passed to the RequestCompletionHandler used by the
ProtocolListener and SessionProtocolHandler
APIs.
| Constructor Summary | |
|---|---|
protected |
AbstractCompletionFuture(RequestCompletionHandler<T> completionHandler)
Constructs an instance with the specified completionHandler. |
| Method Summary | |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
|
protected void |
done()
Indicates that the operation associated with this future is complete and notifies the associated completion handler. |
T |
get()
|
T |
get(long timeout,
TimeUnit unit)
|
protected abstract T |
getValue()
Returns the value associated with this future. |
boolean |
isCancelled()
|
boolean |
isDone()
|
protected void |
setException(Throwable throwable)
Sets the exception cause for this future to the specified throwable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractCompletionFuture(RequestCompletionHandler<T> completionHandler)
completionHandler.
completionHandler - a completion handler| Method Detail |
|---|
protected abstract T getValue()
public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface Future<T>
public T get()
throws InterruptedException,
ExecutionException
get in interface Future<T>InterruptedException
ExecutionException
public T get(long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
get in interface Future<T>InterruptedException
ExecutionException
TimeoutExceptionpublic boolean isCancelled()
isCancelled in interface Future<T>protected void setException(Throwable throwable)
throwable. The given exception will be used as
the cause of the ExecutionException thrown by
this future's get methods.
throwable - an exception causepublic boolean isDone()
isDone in interface Future<T>protected void done()
isDone
will return true.
IllegalStateException - if this method has already been
invoked
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||