org.apache.hc.client5.http.impl.compat

## Class ClassicToAsyncAdaptor

- java.lang.Object
- - org.apache.hc.client5.http.impl.classic.CloseableHttpClient
  - - org.apache.hc.client5.http.impl.compat.ClassicToAsyncAdaptor

All Implemented Interfaces:
  Closeable, AutoCloseable, HttpClient, ModalCloseable

    @Experimental
     @Internal
     @Contract(threading=SAFE_CONDITIONAL)
    public class ClassicToAsyncAdaptor
    extends CloseableHttpClient

`CloseableHttpClient` implementation backed by `CloseableHttpAsyncClient` acting as a compatibility bridge with the classic APIs based on the standard `InputStream` / `OutputStream` model.

Since:
  5.5

### Constructor Summary

Constructors
Constructor and Description
`ClassicToAsyncAdaptor(CloseableHttpAsyncClient client, Timeout operationTimeout)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`void` `close(CloseMode closeMode)`
`protected CloseableHttpResponse` `doExecute(HttpHost target, ClassicHttpRequest request, HttpContext context)`

### Methods inherited from class org.apache.hc.client5.http.impl.classic.CloseableHttpClient

`execute, execute, execute, execute, execute, execute, execute, execute`

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

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

### Methods inherited from interface org.apache.hc.client5.http.classic.HttpClient

`executeOpen`

### Constructor Detail

#### ClassicToAsyncAdaptor

    public ClassicToAsyncAdaptor(CloseableHttpAsyncClient client,
                                 Timeout operationTimeout)

### Method Detail

#### doExecute

    protected CloseableHttpResponse doExecute(HttpHost target,
                                              ClassicHttpRequest request,
                                              HttpContext context)
                                       throws IOException

Specified by:
  `doExecute` in class `CloseableHttpClient`
Throws:
  `IOException`

#### close

    public void close()
               throws IOException

Throws:
  `IOException`

#### close

    public void close(CloseMode closeMode)