- All Superinterfaces:
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 TypeMethodDescriptionWaits if necessary for the computation to complete, and then retrieves its result.booleanReturnstrueif this call was canceled before it completed normally.booleanisDone()Returnstrueif this call completed.Methods inherited from interface org.miaixz.bus.http.plugin.httpv.Cancelable
cancel
-
Method Details
-
isCanceled
boolean isCanceled()Returnstrueif this call was canceled before it completed normally.- Returns:
trueif this call was canceled.
-
isDone
boolean isDone()Returnstrueif this call completed. Completion may be due to normal termination, an exception, or cancellation -- in all of these cases, this method will returntrue.- Returns:
trueif 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.
-