hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Allow access to default HttpParams
Date Tue, 14 Dec 2010 16:06:14 GMT
On 14 December 2010 13:27, Oleg Kalnichevski <olegk@apache.org> wrote:
>> >
>> > Makes sense to me.
>>
>> How about adding entrySet() to the HttpParams interface?
>
> We can't do that
>
>> Without that, DefaultedHttpParams has to assume that its local
>> HttpParams extends AbstractHttpParams.
>>
>> Changing the interface would of course break any code that implements
>> the HttpParams interface without extending AbstractHttpParams.
>>
>> I suppose one could extend the HttpParams interface to add the
>> entrySet, and have AbstractHttpParams implement that instead.
>>
>
> An extended or an optional interface should be ok, though
>
> How about an optional interface or something similar?
>
> interface HttpParamSet {
>
>  Iterator iterator();
>
> }

Just realised that won't gain anything, because the classes such as
DefaultedHttpParams have to support HttpParams.

I think the best one can do is to add the method to the abstract
parent class (which most - if not all - implementations will use
anyway).

The optional interface could be added later if independent
implementations of HttpParams needed to support entrySet - but I'm not
sure it's worth adding it now?

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

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


Mime
View raw message