public class HttpComponentsAsyncClientHttpRequestFactory extends HttpComponentsClientHttpRequestFactory implements AsyncClientHttpRequestFactory, InitializingBean
HttpComponentsClientHttpRequestFactory. Uses
 Apache HttpComponents
 HttpAsyncClient 4.0 to create requests.HttpAsyncClient| Constructor and Description | 
|---|
| HttpComponentsAsyncClientHttpRequestFactory()Create a new instance of the  HttpComponentsAsyncClientHttpRequestFactorywith a defaultHttpAsyncClientandHttpClient. | 
| HttpComponentsAsyncClientHttpRequestFactory(org.apache.http.impl.nio.client.CloseableHttpAsyncClient httpAsyncClient)Create a new instance of the  HttpComponentsAsyncClientHttpRequestFactorywith the givenHttpAsyncClientinstance and a defaultHttpClient. | 
| HttpComponentsAsyncClientHttpRequestFactory(CloseableHttpClient httpClient,
                                           org.apache.http.impl.nio.client.CloseableHttpAsyncClient httpAsyncClient)Create a new instance of the  HttpComponentsAsyncClientHttpRequestFactorywith the givenHttpClientandHttpAsyncClientinstances. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | afterPropertiesSet()Invoked by a BeanFactory after it has set all bean properties supplied
 (and satisfied BeanFactoryAware and ApplicationContextAware). | 
| AsyncClientHttpRequest | createAsyncRequest(URI uri,
                  HttpMethod httpMethod)Create a new asynchronous  AsyncClientHttpRequestfor the specified URI
 and HTTP method. | 
| void | destroy()Shutdown hook that closes the underlying
  ClientConnectionManager's
 connection pool, if any. | 
| org.apache.http.impl.nio.client.CloseableHttpAsyncClient | getHttpAsyncClient()Return the  HttpClientused for
 asynchronous execution. | 
| void | setHttpAsyncClient(org.apache.http.impl.nio.client.CloseableHttpAsyncClient httpAsyncClient)Set the  HttpClientused for
 asynchronous execution. | 
createHttpContext, createHttpUriRequest, createRequest, createRequestConfig, getHttpClient, mergeRequestConfig, postProcessHttpRequest, setBufferRequestBody, setConnectionRequestTimeout, setConnectTimeout, setHttpClient, setReadTimeoutpublic HttpComponentsAsyncClientHttpRequestFactory()
HttpComponentsAsyncClientHttpRequestFactory
 with a default HttpAsyncClient and HttpClient.public HttpComponentsAsyncClientHttpRequestFactory(org.apache.http.impl.nio.client.CloseableHttpAsyncClient httpAsyncClient)
HttpComponentsAsyncClientHttpRequestFactory
 with the given HttpAsyncClient instance and a default HttpClient.httpAsyncClient - the HttpAsyncClient instance to use for this request factorypublic HttpComponentsAsyncClientHttpRequestFactory(CloseableHttpClient httpClient, org.apache.http.impl.nio.client.CloseableHttpAsyncClient httpAsyncClient)
HttpComponentsAsyncClientHttpRequestFactory
 with the given HttpClient and HttpAsyncClient instances.httpClient - the HttpClient instance to use for this request factoryhttpAsyncClient - the HttpAsyncClient instance to use for this request factorypublic void setHttpAsyncClient(org.apache.http.impl.nio.client.CloseableHttpAsyncClient httpAsyncClient)
HttpClient used for
 asynchronous execution.public org.apache.http.impl.nio.client.CloseableHttpAsyncClient getHttpAsyncClient()
HttpClient used for
 asynchronous execution.public void afterPropertiesSet()
InitializingBeanThis method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet in interface InitializingBeanpublic AsyncClientHttpRequest createAsyncRequest(URI uri, HttpMethod httpMethod) throws IOException
AsyncClientHttpRequestFactoryAsyncClientHttpRequest for the specified URI
 and HTTP method.
 The returned request can be written to, and then executed by calling
 AsyncClientHttpRequest.executeAsync().
createAsyncRequest in interface AsyncClientHttpRequestFactoryuri - the URI to create a request forhttpMethod - the HTTP method to executeIOException - in case of I/O errorspublic void destroy()
             throws Exception
HttpComponentsClientHttpRequestFactoryClientConnectionManager's
 connection pool, if any.destroy in interface DisposableBeandestroy in class HttpComponentsClientHttpRequestFactoryException - in case of shutdown errors.
 Exceptions will get logged but not rethrown to allow
 other beans to release their resources too.