public class NotifyingFutureImpl<T> extends Object implements NotifyingFuture<T>
| Constructor and Description |
|---|
NotifyingFutureImpl() |
| Modifier and Type | Method and Description |
|---|---|
NotifyingFuture<T> |
attachListener(FutureListener futureListener)
Attaches a listener and returns the same future instance, to allow for 'building'.
|
boolean |
cancel(boolean mayInterruptIfRunning) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
notifyFutureCompletion() |
void |
setExecuting(Future<T> executing) |
public NotifyingFuture<T> attachListener(FutureListener futureListener)
NotifyingFutureattachListener in interface NotifyingFuture<T>futureListener - listener to attachpublic boolean cancel(boolean mayInterruptIfRunning)
public void notifyFutureCompletion()
public boolean isCancelled()
isCancelled in interface Future<T>public T get() throws InterruptedException, ExecutionException
get in interface Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.