com.holonplatform.http.rest

## Enum RestClientFactoryRegistry

- java.lang.Object
- - java.lang.Enum<RestClientFactoryRegistry>
  - - com.holonplatform.http.rest.RestClientFactoryRegistry

- All Implemented Interfaces:
    Serializable, Comparable<RestClientFactoryRegistry>

      public enum RestClientFactoryRegistry
      extends Enum<RestClientFactoryRegistry>

  `RestClientFactory` registry.
  Since:
    5.0.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
    --- | ---
    `RestClient` | `createRestClient(String fullyQualifiedClassName, ClassLoader classLoader)` Get a `RestClient` instance for given `fullyQualifiedClassName` and `ClassLoader` using a suitable `RestClientFactory`.
    `List<RestClientFactory>` | `getRestClientFactories(String fullyQualifiedClassName, ClassLoader classLoader)` Get the `RestClientFactory` for given `fullyQualifiedClassName` `RestClient` instance and `ClassLoader`.
    `static RestClientFactoryRegistry` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static RestClientFactoryRegistry[]` | `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 RestClientFactoryRegistry INSTANCE

  - ### Method Detail

    - #### values

          public static RestClientFactoryRegistry[] 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 (RestClientFactoryRegistry c : RestClientFactoryRegistry.values())
              System.out.println(c);

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

    - #### valueOf

          public static RestClientFactoryRegistry 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 RestClient createRestClient(String fullyQualifiedClassName,
                                             ClassLoader classLoader)

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

    - #### getRestClientFactories

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

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

Copyright © 2017 The Holon Platform. All rights reserved.