hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject [HttpCore] HttpParams interface was Re: [Jakarta-httpclient Wiki] Update of "GuidedTourOfHttpCore" by RolandWeber
Date Sun, 15 Jul 2007 10:22:23 GMT
Roland Weber wrote:
>> PS: on a side note, because that was one thing I was wondering about:
>> From a framework perspective, parameters are read-only.
>> Was it too difficult to use in the client or why didn't you make the
>> HttpParams interface readonly and provided a subinterface (for use in the
>> helper classes HttpProtocolParams and HttpConnectionParams) with the setter
>> methods? Since the core doesn't need the setter methods it looks like the
>> way to go to design the interface.
> Actually, I haven't tought about it that much. It is easier to use
> for applications, because they must modify the parameters before
> passing them to the core. Splitting in two interfaces for reading
> and writing is something I'll consider for a while.
> Oleg, others, what do you think?
>   interface HttpParams
>   interface ModifiableHttpParams
> Some of the parameter stuff I want to introduce in client alpha2
> will be read-only anyway. I thought about throwing an exception
> in setParameter, but having a read-only interface would be better.
Do you still envisage the following way of setting HTTP parameters?

httpclient.getParams().setParameter("whatever", someObject);

or with the suggested change in place one would have to provide a whole 
new instance of HttpParams in order to change a single parameter?

BasicHttpParams params = new BasicHttpParams();
params.setParameter("whatever", someObject);


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

View raw message