Package org.xnio
Interface Result<T>
- All Known Implementing Classes:
FutureResult,TranslatingResult
public interface Result<T>
A handler for the result of an operation. May be used to populate an
IoFuture.-
Method Summary
Modifier and TypeMethodDescriptionbooleanAcknowledge the cancellation of this operation.booleansetException(IOException exception) Set the exception for this operation.booleanSet the result for this operation.
-
Method Details
-
setResult
Set the result for this operation. Any threads blocking on this instance will be unblocked.- Parameters:
result- the result to set- Returns:
falseif the operation was already completed,trueotherwise
-
setException
Set the exception for this operation. Any threads blocking on this instance will be unblocked.- Parameters:
exception- the exception to set- Returns:
falseif the operation was already completed,trueotherwise
-
setCancelled
boolean setCancelled()Acknowledge the cancellation of this operation.- Returns:
falseif the operation was already completed,trueotherwise
-