users@jersey.java.net

Re: [Jersey] A Jersey Client doing HTTP Cache

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Tue, 12 Oct 2010 14:41:12 +0200

On Oct 12, 2010, at 1:33 PM, Imran M Yousuf wrote:

> On Tue, Oct 12, 2010 at 5:17 PM, Paul Sandoz
> <Paul.Sandoz_at_oracle.com> wrote:
>>
>> <skip />
>>
>> Can CacheableClientHandler can extend from ApacheHttpClientHandler
>> and use
>> the following constructor:
>>
>> public ApacheHttpClientHandler(HttpClient client, ClientConfig
>> config,
>> ApacheHttpMethodExecutor methodExecutor)
>>
>
> I gave it a serious thought, but this could be done but won't be right
> in theoretically!

Is it because ApacheHttpClientHandler already defines an
implementation? fair enough, i guess i don't consider this too
theoretical :-)


> One thing that could be done is we could extract an
> abstract apache http client handler that does these settings in the
> constructor, then the inheritance would be perfect.
>

Yes, we can do that. In fact in such cases the constructor could just
be:

   AbstractApacheHttpClientHandler(HttpClient client, ClientConfig
config)

Do you want to send me another patch :-)

Paul.