org.springframework.http.client.support

## Class AsyncHttpAccessor

- java.lang.Object
- - org.springframework.http.client.support.AsyncHttpAccessor

- Direct Known Subclasses:
    AsyncRestTemplate

      public class AsyncHttpAccessor
      extends Object

  Base class for `AsyncRestTemplate` and other HTTP accessing gateway helpers, defining common properties such as the `AsyncClientHttpRequestFactory` to operate on.

  Not intended to be used directly. See `AsyncRestTemplate`.

  Since:
    4.0
  Author:
    Arjen Poutsma
  See Also:
    `AsyncRestTemplate`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Log` | `logger` Logger available to subclasses.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AsyncHttpAccessor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected AsyncClientHttpRequest` | `createAsyncRequest(URI url, HttpMethod method)` Create a new `AsyncClientHttpRequest` via this template's `AsyncClientHttpRequestFactory`.
    `AsyncClientHttpRequestFactory` | `getAsyncRequestFactory()` Return the request factory that this accessor uses for obtaining `HttpRequests`.
    `void` | `setAsyncRequestFactory(AsyncClientHttpRequestFactory asyncRequestFactory)` Set the request factory that this accessor uses for obtaining `HttpRequests`.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected final Log logger

      Logger available to subclasses.

  - ### Constructor Detail

    - #### AsyncHttpAccessor

          public AsyncHttpAccessor()

  - ### Method Detail

    - #### setAsyncRequestFactory

          public void setAsyncRequestFactory(AsyncClientHttpRequestFactory asyncRequestFactory)

      Set the request factory that this accessor uses for obtaining `HttpRequests`.

    - #### getAsyncRequestFactory

          public AsyncClientHttpRequestFactory getAsyncRequestFactory()

      Return the request factory that this accessor uses for obtaining `HttpRequests`.

    - #### createAsyncRequest

          protected AsyncClientHttpRequest createAsyncRequest(URI url,
                                                              HttpMethod method)
                                                       throws IOException

      Create a new `AsyncClientHttpRequest` via this template's `AsyncClientHttpRequestFactory`.
      Parameters:
        `url` - the URL to connect to
        `method` - the HTTP method to execute (GET, POST, etc.)
      Returns:
        the created request
      Throws:
        `IOException` - in case of I/O errors