com.holonplatform.async.http

## Interface AsyncRestClientFactory

-     public interface AsyncRestClientFactory

  Factory to create `AsyncRestClient` instances.

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

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

  Since:
    5.2.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
    --- | ---
    `AsyncRestClient` | `create(ClassLoader classLoader)` Create a new `AsyncRestClient` instance.
    `Class<?>` | `getRestClientImplementationClass()` Get the `AsyncRestClient` 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 `AsyncRestClient` implementation class returned by this factory.
      Returns:
        the `AsyncRestClient` implementation class

    - #### create

          AsyncRestClient create(ClassLoader classLoader)
                          throws RestClientCreationException

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

Copyright © 2019 The Holon Platform. All rights reserved.