public class NotifyingFutureImpl<T> extends Object implements NotifyingFuture<T>
Constructor and Description |
---|
NotifyingFutureImpl() |
Modifier and Type | Method and Description |
---|---|
NotifyingFuture<T> |
attachListener(FutureListener<T> 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<T> futureListener)
NotifyingFuture
attachListener
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>
InterruptedException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
InterruptedException
ExecutionException
TimeoutException
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.