public class NoOpFuture<E> extends Object implements NotifyingNotifiableFuture<E>
Constructor and Description |
---|
NoOpFuture(E returnValue) |
NoOpFuture(Throwable t) |
Modifier and Type | Method and Description |
---|---|
NotifyingFuture<E> |
attachListener(FutureListener<E> eFutureListener)
Attaches a listener and returns the same future instance, to allow for 'building'.
|
boolean |
cancel(boolean b) |
E |
get() |
E |
get(long l,
TimeUnit timeUnit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
notifyDone(E result)
Notify the listeners that the operation has finished.
|
void |
notifyException(Throwable exception)
Notify the listeners that the operation has finished.
|
void |
setFuture(Future<E> eFuture)
Setup the future which is wrapped by implementation of this interface.
|
public NoOpFuture(E returnValue)
public NoOpFuture(Throwable t)
public boolean isCancelled()
isCancelled
in interface Future<E>
public E get() throws InterruptedException, ExecutionException
get
in interface Future<E>
InterruptedException
ExecutionException
public E get(long l, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<E>
InterruptedException
ExecutionException
TimeoutException
public void notifyDone(E result)
NotifyingNotifiableFuture
notifyDone
in interface NotifyingNotifiableFuture<E>
public void notifyException(Throwable exception)
NotifyingNotifiableFuture
notifyException
in interface NotifyingNotifiableFuture<E>
public void setFuture(Future<E> eFuture)
NotifyingNotifiableFuture
setFuture
in interface NotifyingNotifiableFuture<E>
public NotifyingFuture<E> attachListener(FutureListener<E> eFutureListener)
NotifyingFuture
attachListener
in interface NotifyingFuture<E>
eFutureListener
- listener to attachCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.