com.holonplatform.async.http

## Interface AsyncRestClient

- All Superinterfaces:
    RestClientOperations<AsyncRestClient,AsyncRestClient.AsyncRequestDefinition>
  All Known Implementing Classes:
    AbstractAsyncRestClient

      public interface AsyncRestClient
      extends RestClientOperations<AsyncRestClient,AsyncRestClient.AsyncRequestDefinition>

  Async HTTP REST client to build and execute client requests in order to asynchronously consume the responses returned.
  Since:
    5.2.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `AsyncRestClient.AsyncInvocation` Invocation operations
    `static interface` | `AsyncRestClient.AsyncRequestDefinition` Request message definition and response invocation.

    - ### Nested classes/interfaces inherited from interface com.holonplatform.http.rest.RestClientOperations

      `RestClientOperations.InvocationOperations<RE,RP,RS,RL,RU>, RestClientOperations.RequestConfiguration<R extends RestClientOperations.RequestConfiguration<R>>`

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AsyncRestClient` | `create()` Create a new `AsyncRestClient` instance using default `ClassLoader` and default implementation, if available.
    `static AsyncRestClient` | `create(ClassLoader classLoader)` Create a new `AsyncRestClient` instance using given `classLoder` and default implementation, if available.
    `static AsyncRestClient` | `create(String fullyQualifiedClassName)` Create a new `AsyncRestClient` instance using default `ClassLoader` and the implementation whith given fully qualified class name.
    `static AsyncRestClient` | `create(String fullyQualifiedClassName, ClassLoader classLoader)` Create a new `AsyncRestClient` instance using given `classLoder` and the implementation whith given fully qualified class name.
    `static AsyncRestClient` | `forTarget(String baseUri)` Create a new `AsyncRestClient` instance using default `ClassLoader` and default implementation, setting given `baseUri` as default `AsyncRestClient` target, which will be used as base URI for every request configured using `RestClientOperations.request()`, if not overridden using `RestClientOperations.RequestConfiguration.target(URI)`.
    `static AsyncRestClient` | `forTarget(URI baseUri)` Create a new `AsyncRestClient` instance using default `ClassLoader` and default implementation, setting given `baseUri` as default `AsyncRestClient` target, which will be used as base URI for every request configured using `RestClientOperations.request()`, if not overridden using `RestClientOperations.RequestConfiguration.target(URI)`.

    - ### Methods inherited from interface com.holonplatform.http.rest.RestClientOperations

      `clearDefaultHeaders, defaultTarget, getDefaultTarget, removeDefaultHeader, request, withDefaultHeader`

- - ### Method Detail

    - #### forTarget

          static AsyncRestClient forTarget(String baseUri)

      Create a new `AsyncRestClient` instance using default `ClassLoader` and default implementation, setting given `baseUri` as default `AsyncRestClient` target, which will be used as base URI for every request configured using `RestClientOperations.request()`, if not overridden using `RestClientOperations.RequestConfiguration.target(URI)`.
      Parameters:
        `baseUri` - The base target URI of the returned `AsyncRestClient`
      Returns:
        A new `AsyncRestClient` instance

    - #### forTarget

          static AsyncRestClient forTarget(URI baseUri)

      Create a new `AsyncRestClient` instance using default `ClassLoader` and default implementation, setting given `baseUri` as default `AsyncRestClient` target, which will be used as base URI for every request configured using `RestClientOperations.request()`, if not overridden using `RestClientOperations.RequestConfiguration.target(URI)`.
      Parameters:
        `baseUri` - The base target URI of the returned `AsyncRestClient`
      Returns:
        A new `AsyncRestClient` instance

    - #### create

          static AsyncRestClient create()

      Create a new `AsyncRestClient` instance using default `ClassLoader` and default implementation, if available. If more than one `AsyncRestClient` implementation is found using given ClassLoader, the one returned by the `AsyncRestClientFactory` with the higher priority is returned.
      Returns:
        A new `AsyncRestClient` instance
      Throws:
        `RestClientCreationException` - If a `AsyncRestClient` implementation is not available or a instance creation error occurred

    - #### create

          static AsyncRestClient create(ClassLoader classLoader)

      Create a new `AsyncRestClient` instance using given `classLoder` and default implementation, if available. If more than one `AsyncRestClient` implementation is found using given ClassLoader, the one returned by the `AsyncRestClientFactory` with the higher priority is returned.
      Parameters:
        `classLoader` - The `ClassLoader` to use
      Returns:
        A new `AsyncRestClient` instance
      Throws:
        `RestClientCreationException` - If a `AsyncRestClient` implementation is not available or a instance creation error occurred

    - #### create

          static AsyncRestClient create(String fullyQualifiedClassName)

      Create a new `AsyncRestClient` instance using default `ClassLoader` and the implementation whith given fully qualified class name.
      Parameters:
        `fullyQualifiedClassName` - The `AsyncRestClient` implementation fully qualified class name to obtain
      Returns:
        A new `AsyncRestClient` instance
      Throws:
        `RestClientCreationException` - If the implementation which corresponds to given fully qualified class name is not available or a instance creation error occurred

    - #### create

          static AsyncRestClient create(String fullyQualifiedClassName,
                                        ClassLoader classLoader)

      Create a new `AsyncRestClient` instance using given `classLoder` and the implementation whith given fully qualified class name.
      Parameters:
        `fullyQualifiedClassName` - The `AsyncRestClient` implementation fully qualified class name to obtain
        `classLoader` - The `ClassLoader` to use
      Returns:
        A new `AsyncRestClient` instance
      Throws:
        `RestClientCreationException` - If the implementation which corresponds to given fully qualified class name is not available or a instance creation error occurred

Copyright © 2019 The Holon Platform. All rights reserved.