Module bus.http

Interface GiveCall

All Superinterfaces:
Cancelable

public interface GiveCall extends Cancelable
Represents an asynchronous call that can be canceled and from which a result can be retrieved.
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    Waits if necessary for the computation to complete, and then retrieves its result.
    boolean
    Returns true if this call was canceled before it completed normally.
    boolean
    Returns true if this call completed.

    Methods inherited from interface org.miaixz.bus.http.plugin.httpv.Cancelable

    cancel
  • Method Details

    • isCanceled

      boolean isCanceled()
      Returns true if this call was canceled before it completed normally.
      Returns:
      true if this call was canceled.
    • isDone

      boolean isDone()
      Returns true if this call completed. Completion may be due to normal termination, an exception, or cancellation -- in all of these cases, this method will return true.
      Returns:
      true if this call completed.
    • getResult

      CoverResult getResult()
      Waits if necessary for the computation to complete, and then retrieves its result. This method will block the current thread until the result is available.
      Returns:
      The result of the request execution.