com.holonplatform.async.http.internal

## Enum AsyncRestClientFactoryRegistry

- java.lang.Object
- - java.lang.Enum<AsyncRestClientFactoryRegistry>
  - - com.holonplatform.async.http.internal.AsyncRestClientFactoryRegistry

- All Implemented Interfaces:
    Serializable, Comparable<AsyncRestClientFactoryRegistry>

      public enum AsyncRestClientFactoryRegistry
      extends Enum<AsyncRestClientFactoryRegistry>

  `AsyncRestClientFactory` registry.
  Since:
    5.2.0

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `INSTANCE`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AsyncRestClient` | `createRestClient(String fullyQualifiedClassName, ClassLoader classLoader)` Get a `AsyncRestClient` instance for given `fullyQualifiedClassName` and `ClassLoader` using a suitable `AsyncRestClientFactory`.
    `List<AsyncRestClientFactory>` | `getRestClientFactories(String fullyQualifiedClassName, ClassLoader classLoader)` Get the `AsyncRestClientFactory` for given `fullyQualifiedClassName` `AsyncRestClient` instance and `ClassLoader`.
    `static AsyncRestClientFactoryRegistry` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static AsyncRestClientFactoryRegistry[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### INSTANCE

          public static final AsyncRestClientFactoryRegistry INSTANCE

  - ### Method Detail

    - #### values

          public static AsyncRestClientFactoryRegistry[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (AsyncRestClientFactoryRegistry c : AsyncRestClientFactoryRegistry.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static AsyncRestClientFactoryRegistry valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### createRestClient

          public AsyncRestClient createRestClient(String fullyQualifiedClassName,
                                                  ClassLoader classLoader)

      Get a `AsyncRestClient` instance for given `fullyQualifiedClassName` and `ClassLoader` using a suitable `AsyncRestClientFactory`.
      Parameters:
        `fullyQualifiedClassName` - `AsyncRestClient` class name to obtain, or `null` for the default one
        `classLoader` - ClassLoader for which to obtain the `AsyncRestClient`
      Returns:
        A new `AsyncRestClient` instance for given `fullyQualifiedClassName` (or the default one if `null`) and `ClassLoader`
      Throws:
        `RestClientCreationException` - If no `AsyncRestClientFactory` available, or none of the available factories returned a not `null` instance or a creation error occurred

    - #### getRestClientFactories

          public List<AsyncRestClientFactory> getRestClientFactories(String fullyQualifiedClassName,
                                                                     ClassLoader classLoader)

      Get the `AsyncRestClientFactory` for given `fullyQualifiedClassName` `AsyncRestClient` instance and `ClassLoader`.
      Parameters:
        `fullyQualifiedClassName` - `AsyncRestClientFactory` class name to obtain, or `null` for the default one
        `classLoader` - ClassLoader for which to obtain the factory
      Returns:
        `AsyncRestClientFactory` for given `fullyQualifiedClassName` (or the default one if `null`) and `ClassLoader`
      Throws:
        `RestClientCreationException` - If no `AsyncRestClientFactory` available or a creation error occurred

Copyright © 2019 The Holon Platform. All rights reserved.