Constructor and Description |
---|
FutureResult()
Construct a new instance.
|
FutureResult(Executor executor)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addCancelHandler(Cancellable cancellable)
Add a cancellation handler.
|
IoFuture<T> |
getIoFuture()
Get the
IoFuture for this manager. |
boolean |
setCancelled()
Acknowledge the cancellation of this operation.
|
boolean |
setException(IOException exception)
Set the exception for this operation.
|
boolean |
setResult(T result)
Set the result for this operation.
|
public FutureResult(Executor executor)
executor
- the executor to use to execute listener notifiers.public FutureResult()
public IoFuture<T> getIoFuture()
IoFuture
for this manager.IoFuture
public void addCancelHandler(Cancellable cancellable)
IoFuture
is cancelled. If
the IoFuture
is already cancelled when this method is called, the handler will be called directly.cancellable
- the cancel handlerpublic boolean setResult(T result)
public boolean setException(IOException exception)
setException
in interface Result<T>
exception
- the exception to setfalse
if the operation was already completed, true
otherwisepublic boolean setCancelled()
setCancelled
in interface Result<T>
false
if the operation was already completed, true
otherwiseCopyright © 2019 JBoss by Red Hat. All rights reserved.