Interface ActiveOperation.ResultHandler<T>

Type Parameters:
T - the result type
Enclosing interface:
ActiveOperation<T,A>

public static interface ActiveOperation.ResultHandler<T>
Handler for the operation result or to mark the operation as cancelled or failed.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancel the operation.
    boolean
    done(T result)
    Set the result.
    boolean
    Mark the operation as failed.
  • Method Details

    • done

      boolean done(T result)
      Set the result.
      Parameters:
      result - the result
      Returns:
      true if the result was successfully set, or false if a result was already set
    • failed

      boolean failed(Throwable t)
      Mark the operation as failed.
      Parameters:
      t - the exception
      Returns:
      true if the result was successfully set, or false if a result was already set
    • cancel

      void cancel()
      Cancel the operation.