Package org.xnio
Class TranslatingResult<T,O>
java.lang.Object
org.xnio.TranslatingResult<T,O>
- Type Parameters:
T- the result type to acceptO- the result type to pass to the delegate
- All Implemented Interfaces:
Result<T>
Abstract base class for
Results which translate from one type to another.-
Constructor Summary
Constructors -
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.protected abstract O
-
Constructor Details
-
TranslatingResult
-
-
Method Details
-
setException
Description copied from interface:ResultSet the exception for this operation. Any threads blocking on this instance will be unblocked.- Specified by:
setExceptionin interfaceResult<T>- Parameters:
exception- the exception to set- Returns:
falseif the operation was already completed,trueotherwise
-
setCancelled
public boolean setCancelled()Description copied from interface:ResultAcknowledge the cancellation of this operation.- Specified by:
setCancelledin interfaceResult<T>- Returns:
falseif the operation was already completed,trueotherwise
-
setResult
Description copied from interface:ResultSet the result for this operation. Any threads blocking on this instance will be unblocked. -
translate
- Throws:
IOException
-