public class NotifyingFutureImpl extends Object implements NotifyingNotifiableFuture<Object>
NotifyingFuture.
Typical usage:
Object retval = .... // do some work here NotifyingFuture nf = new NotifyingFutureImpl(retval);
rpcManager.broadcastRpcCommandInFuture(nf, command); return nf; | Constructor and Description |
|---|
NotifyingFutureImpl(Object actualReturnValue) |
| Modifier and Type | Method and Description |
|---|---|
NotifyingFuture<Object> |
attachListener(FutureListener<Object> objectFutureListener)
Attaches a listener and returns the same future instance, to allow for 'building'.
|
boolean |
cancel(boolean mayInterruptIfRunning) |
Object |
get() |
Object |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
notifyDone() |
void |
setNetworkFuture(Future<Object> future) |
public NotifyingFutureImpl(Object actualReturnValue)
public void setNetworkFuture(Future<Object> future)
setNetworkFuture in interface NotifyingNotifiableFuture<Object>public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<Object>public Object get() throws InterruptedException, ExecutionException
get in interface Future<Object>InterruptedExceptionExecutionExceptionpublic Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<Object>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic void notifyDone()
notifyDone in interface NotifyingNotifiableFuture<Object>public NotifyingFuture<Object> attachListener(FutureListener<Object> objectFutureListener)
NotifyingFutureattachListener in interface NotifyingFuture<Object>objectFutureListener - listener to attachCopyright © 2012 JBoss by Red Hat. All Rights Reserved.