public final class AwaitableAdapterRegistry
extends Object
Central registry for AwaitableAdapter instances.
On class-load, adapters are discovered via ServiceLoader from
META-INF/services/groovy.concurrent.AwaitableAdapter. Two built-in
adapters are always present after SPI-loaded ones:
await and multi-value for await).Future fallback handling CompletableFuture,
CompletionStage, and Future (via a blocking wrapper).| Type Params | Return Type | Name and description |
|---|---|---|
|
protected AwaitableAdapter |
computeValue(Class<?> type) |
|
public static void |
register(AwaitableAdapter adapter)Registers an adapter at the highest priority (before SPI-loaded adapters). |
<T> |
public static Iterable<T> |
toIterable(Object source)Converts the given source to an Iterable for for await. |
|
public static void |
unregister(AwaitableAdapter adapter)Removes a previously registered adapter. |
Registers an adapter at the highest priority (before SPI-loaded adapters).
Converts the given source to an Iterable for for await.
Removes a previously registered adapter.