Module 
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 Type
    Method
    Description
    boolean
    Acknowledge the cancellation of this operation.
    boolean
    Set the exception for this operation.
    boolean
    setResult(T result)
    Set the result for this operation.
  • Method Details

    • 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