com.holonplatform.http.rest

## Interface RestClientFactory

-     public interface RestClientFactory

  Factory to create `RestClient` instances.

  RestClientFactory registration can be performed using default Java extension through `ServiceLoader`, providing a `com.holonplatform.http.rest.RestClientFactory` file in `META-INF/services` containing the RestClientFactory concrete class names to register.

  The `RestClientFactory`s priority declaration is supported using the `Priority` annotation on factory class (where less priority value means higher priority order).

  Since:
    5.0.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_PRIORITY` Default factory priority

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `RestClient` | `create(ClassLoader classLoader)` Create a new `RestClient` instance.
    `Class<?>` | `getRestClientImplementationClass()` Get the `RestClient` implementation class returned by this factory.

- - ### Field Detail

    - #### DEFAULT_PRIORITY

          static final int DEFAULT_PRIORITY

      Default factory priority
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getRestClientImplementationClass

          Class<?> getRestClientImplementationClass()

      Get the `RestClient` implementation class returned by this factory.
      Returns:
        the `RestClient` implementation class

    - #### create

          RestClient create(ClassLoader classLoader)
                     throws RestClientCreationException

      Create a new `RestClient` instance.
      Parameters:
        `classLoader` - The `ClassLoader` for which the instance creation is requested
      Returns:
        A new `RestClient` instance
      Throws:
        `RestClientCreationException` - If an error occurred

Copyright © 2019 The Holon Platform. All rights reserved.