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>
InterruptedException
ExecutionException
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<V>
InterruptedException
ExecutionException
TimeoutException
public 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)
NotifyingFuture
attachListener
in interface NotifyingFuture<V>
objectFutureListener
- listener to attachpublic boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<V>
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.