hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Goubard (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCLIENT-1292) Get the embedded HttpClient from decorator HttpClient
Date Mon, 07 Jan 2013 18:58:12 GMT
Anthony Goubard created HTTPCLIENT-1292:
-------------------------------------------

             Summary: Get the embedded HttpClient from decorator HttpClient
                 Key: HTTPCLIENT-1292
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1292
             Project: HttpComponents HttpClient
          Issue Type: Improvement
          Components: HttpClient
    Affects Versions: 4.2.2
            Reporter: Anthony Goubard


If the developer gets a HttpClient thats extends AbstractHttpClient, he will be able to add
interceptor and call all the public get or set method of this class.

If the HttpClient is a decorator it's not possible to do all of this. The reason is that you
cannot get the embedded HttpClient from a decorator client.

What would be nice, is to have an interface DecoratorClient with the method getEmbeddedHttpClient()
This interface would be implemented by AutoRetryHttpClient, DecompressingHttpClient and CachingHttpClient.

This way whenever you chain HttpClient you could still benefit from the methods of AbstractHttpClient/DefaultHttpClient.

Another possbility would be to have a getBaseHttpClient() and to have it implemented with
return this in AbstractHttpClient.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message