Module 
Package org.xnio

Interface Result<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean setCancelled()
      Acknowledge the cancellation of this operation.
      boolean setException​(java.io.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​(java.io.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