hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Allow access to default HttpParams
Date Mon, 13 Dec 2010 20:32:45 GMT
On Mon, 2010-12-13 at 16:35 +0000, sebb wrote:

> ==
> I think there should be a public method which gives access to a
> read-only copy of the parameters.
> This could either be done by:
> * changing BasicHttpParams#copyParams(HttpParams target) to be public,
> in which case we probably need to add a synch. version to the
> subclass.
> * or, provide public access to a read-only iterator (again, might need
> to have synch. version for the subclass).
> Note: I have got a work-round for JMeter, but it is a bit messy.
> It seems to me that other application code may have similar use cases
> - it would certainly be useful to be able to enumerate HttpParams for
> debugging purposes.

Feel free to introduce an iterator to BasicHttpParams / SyncHttpParams
classes. You do not need to do anything special for the synchronized
versions as usually iterators are not thread-safe. It is a common
practice that one must explicitly synchronize of the instance prior to
using it.



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

View raw message