public class NullFuture<T> extends Object implements NotifyingFuture<T>
Constructor and Description |
---|
NullFuture(T retval) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
NotifyingFuture |
setListener(FutureListener<T> listener)
Attaches a listener and returns the same future instance, to allow for 'building' futures.
|
public NullFuture(T retval)
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
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
TimeoutException
public NotifyingFuture setListener(FutureListener<T> listener)
NotifyingFuture
setListener
in interface NotifyingFuture<T>
listener
- listener to attachCopyright © 2012 JBoss by Red Hat. All Rights Reserved.