[
https://issues.apache.org/jira/browse/HTTPCLIENT-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oleg Kalnichevski resolved HTTPCLIENT-1724.
-------------------------------------------
Resolution: Won't Fix
Fix Version/s: (was: 5.0 Alpha2)
Kalyanaraman,
I have spent some time thinking about it. I am sorry but coupling
{{HttpClient}} interface and its implementations with
{{HttpClientConnectionManager}} or {{ConnPoolControl}} still does not look
right to me. With HttpClient 5.0 this is what it takes to get access to
{{ConnPoolControl}} associated with an {{HttpClient}} instance.
{code:java}
PoolingHttpClientConnectionManager connectionManager =
PoolingHttpClientConnectionManagerBuilder.create()
.build();
CloseableHttpClient httpClient = HttpClients.custom()
.setConnectionManager(connectionManager)
.build();
ConnPoolControl<HttpRoute> poolControl = connectionManager;
{code}
Oleg
> Support getConnectionManager() on HttpAsyncClient.class
> -------------------------------------------------------
>
> Key: HTTPCLIENT-1724
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1724
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: HttpClient (classic)
> Reporter: Kalyanaraman Santhanam
> Priority: Minor
>
> When the HttpAsyncClient is initialized using the Builder as follows:
> HttpAsyncClients.custom()
> .build();
> ConnectionManager is initialized to nice set of defaults.
> `https://github.com/apache/httpasyncclient/blob/4.1.x/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/HttpAsyncClientBuilder.java#L647`
> However, the absence of getConnectionManager(), forces anyone who is
> interested in collecting the http stats need to initialize the
> ConnectionManager themselves.
> Which means a developer like is just going to grab the code from the
> `HttpAsyncClientBuilder` and add it my code. This defeats the purpose of
> having a `HttpAsyncClientBuilder` and prevents code reusability.
> So I want to know if there is a way to either expose the ConnectionManager or
> expose the Stats of the ConnectionManager.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]