|
XNIO API 3.1.0.Beta1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xnio.FutureResult<T>
T
- the IoFuture
result typepublic class FutureResult<T>
A result with a corresponding IoFuture
instance.
Constructor Summary | |
---|---|
FutureResult()
Construct a new instance. |
|
FutureResult(Executor executor)
Construct a new instance. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FutureResult(Executor executor)
executor
- the executor to use to execute listener notifiers.public FutureResult()
Method Detail |
---|
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)
setResult
in interface Result<T>
result
- the result to set
false
if the operation was already completed, true
otherwisepublic boolean setException(IOException exception)
setException
in interface Result<T>
exception
- the exception to set
false
if the operation was already completed, true
otherwisepublic boolean setCancelled()
setCancelled
in interface Result<T>
false
if the operation was already completed, true
otherwise
|
XNIO API 3.1.0.Beta1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |