Top Description Methods
org.xnio

public Interface Result<T>

Known Direct Implementers
org.xnio.FutureResult, org.xnio.TranslatingResult
Imports
java.io.IOException

A handler for the result of an operation. May be used to populate an IoFuture.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

false if the operation was already completed, true otherwise
setCancelled
()

Acknowledge the cancellation of this operation.

public boolean

Returns:

false if the operation was already completed, true otherwise
setException
(IOException
the exception to set
exception
)

Set the exception for this operation.

public boolean

Returns:

false if the operation was already completed, true otherwise
setResult
(T
the result to set
result
)

Set the result for this operation.

Method Detail

setCancelledback to summary
public boolean setCancelled()

Acknowledge the cancellation of this operation.

Returns:boolean

false if the operation was already completed, true otherwise

setExceptionback to summary
public boolean setException(IOException exception)

Set the exception for this operation. Any threads blocking on this instance will be unblocked.

Parameters
exception:IOException

the exception to set

Returns:boolean

false if the operation was already completed, true otherwise

setResultback to summary
public boolean setResult(T result)

Set the result for this operation. Any threads blocking on this instance will be unblocked.

Parameters
result:T

the result to set

Returns:boolean

false if the operation was already completed, true otherwise