Package: groovy.concurrent

## [Java] Class AwaitableAdapterRegistry

- groovy.concurrent.AwaitableAdapterRegistry

-     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:

  - FlowPublisherAdapter for Publisher (single-value `await` and multi-value `for await`).
  - A `Future` fallback handling CompletableFuture, CompletionStage, and Future (via a blocking wrapper).
  Since:
    6.0.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### 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.