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 Detail

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