@FunctionalInterface public interface HttpCallCancellation
Implementations allow callers to register a cancellation callback that will be invoked
when the underlying HTTP call should be aborted. The onCancel(Runnable) method
returns an AutoCloseable that, when closed, unregisters the callback.
OpenCodeHttpClient| Modifier and Type | Method and Description |
|---|---|
default boolean |
isCancelled()
Returns whether this cancellation has been triggered.
|
AutoCloseable |
onCancel(Runnable callback)
Registers a cancellation callback and returns a handle to unregister it.
|
AutoCloseable onCancel(Runnable callback)
callback - the runnable to invoke when cancellation is requesteddefault boolean isCancelled()
true,否则返回 falseCopyright © 2026. All rights reserved.