You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Matt Inger (JIRA)" <ji...@apache.org> on 2014/05/05 20:13:14 UTC
[jira] [Created] (HTTPASYNC-76) CachingHttpAsyncClient does not
follow same pattern as Caching HttpClient
Matt Inger created HTTPASYNC-76:
-----------------------------------
Summary: CachingHttpAsyncClient does not follow same pattern as Caching HttpClient
Key: HTTPASYNC-76
URL: https://issues.apache.org/jira/browse/HTTPASYNC-76
Project: HttpComponents HttpAsyncClient
Issue Type: Improvement
Affects Versions: 4.0.1
Reporter: Matt Inger
I would have expected the Caching version of the HttpAsyncClient library to following same pattern as the non async version. In the non-async version, we have a CachingHttpClientBuilder class which extends the HttpClientBuilder, and they both end up returning the same client implementation: CloseableHttpClient.
I would have expected the same from the async version. Instead it uses CachingHttpAsyncClient as a decorator approach.
This is unfortunate, because i really want to be able to not care about the implementation and do this:
CloseableHttpAysncClient client = clientFactory.create("test");
But i cannot do this, due to the design. I also considered this:
HttpAysncClient client = clientFactory.create("test");
But this does not guarantee that it implements Closeable, and in fact, CachingHttpAsyncClient does not implement that interface.
I'd like to see it more in line with the synchronous version.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org