Package io.vertx.core

Interface Completable<T>

    • Method Detail

      • succeed

        default void succeed​(T result)
        Set the result. The instance will be marked as succeeded and completed.

        Parameters:
        result - the result
        Throws:
        IllegalStateException - when this instance is already completed or failed
      • succeed

        default void succeed()
        Shortcut for succeed(null)
        Throws:
        IllegalStateException - when this instance is already completed or failed
      • fail

        default void fail​(Throwable failure)
        Set the failure. This instance will be marked as failed and completed.
        Parameters:
        failure - the failure
        Throws:
        IllegalStateException - when this instance is already completed or failed
      • fail

        default void fail​(String message)
        Calls fail(Throwable) with the message.
        Parameters:
        message - the failure message
        Throws:
        IllegalStateException - when this instance is already completed or failed
      • complete

        void complete​(T result,
                      Throwable failure)
        Complete this instance
        • when failure is null, a success is signaled
        • otherwise a failure is signaled
        Parameters:
        result - the result
        failure - the failure
        Throws:
        IllegalStateException - when this instance is already completed