XNIO API 3.0.7.GA

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
 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.
 

Method Detail

setResult

boolean setResult(T result)
Set the result for this operation. Any threads blocking on this instance will be unblocked.

Parameters:
result - the result to set
Returns:
false if the operation was already completed, true otherwise

setException

boolean setException(IOException exception)
Set the exception for this operation. Any threads blocking on this instance will be unblocked.

Parameters:
exception - the exception to set
Returns:
false if the operation was already completed, true otherwise

setCancelled

boolean setCancelled()
Acknowledge the cancellation of this operation.

Returns:
false if the operation was already completed, true otherwise

XNIO API 3.0.7.GA

Copyright © 2010 JBoss, a division of Red Hat, Inc.