hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPCLIENT-1825) CachingHttpAsyncClient does not follow same pattern as Caching HttpClient
Date Thu, 19 Oct 2017 14:16:00 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Oleg Kalnichevski resolved HTTPCLIENT-1825.
       Resolution: Fixed
    Fix Version/s:     (was: 5.0)
                   5.0 Alpha3

Fixed in master (see HTTPCLIENT-1827).


> CachingHttpAsyncClient does not follow same pattern as Caching HttpClient 
> --------------------------------------------------------------------------
>                 Key: HTTPCLIENT-1825
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1825
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>            Reporter: Matt Inger
>              Labels: volunteers-wanted
>             Fix For: 5.0 Alpha3
> 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

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message