public class DeferredReturnFuture<V> extends Object implements NotifyingNotifiableFuture<V>
| Constructor and Description |
|---|
DeferredReturnFuture() |
| Modifier and Type | Method and Description |
|---|---|
NotifyingFuture<V> |
attachListener(FutureListener<V> objectFutureListener)
Attaches a listener and returns the same future instance, to allow for 'building'.
|
boolean |
cancel(boolean mayInterruptIfRunning) |
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
notifyDone() |
void |
setNetworkFuture(Future<V> future) |
public V get() throws InterruptedException, ExecutionException
get in interface Future<V>InterruptedExceptionExecutionExceptionpublic V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<V>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic void notifyDone()
notifyDone in interface NotifyingNotifiableFuture<V>public void setNetworkFuture(Future<V> future)
setNetworkFuture in interface NotifyingNotifiableFuture<V>public NotifyingFuture<V> attachListener(FutureListener<V> objectFutureListener)
NotifyingFutureattachListener in interface NotifyingFuture<V>objectFutureListener - listener to attachpublic boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<V>Copyright © 2012 JBoss by Red Hat. All Rights Reserved.