public class NotifyingFutureImpl<T> extends BaseNotifyingFuture<T> implements NotifyingNotifiableFuture<T>
NotifyingFuture.
Typical usage:
Object retval = .... // do some work here NotifyingFuture nf = new NotifyingFutureImpl(retval);
rpcManager.broadcastRpcCommandInFuture(nf, command); return nf; | Constructor and Description |
|---|
NotifyingFutureImpl(T actualReturnValue) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
setNetworkFuture(Future<T> future) |
attachListener, notifyDoneclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnotifyDoneattachListenerpublic NotifyingFutureImpl(T actualReturnValue)
public void setNetworkFuture(Future<T> future)
setNetworkFuture in interface NotifyingNotifiableFuture<T>public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<T>public T get() throws InterruptedException, ExecutionException
get in interface Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2014 JBoss, a division of Red Hat. All rights reserved.