hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: Defining preferences using properties
Date Fri, 15 Sep 2006 12:55:00 GMT
Hi Sebastian,

I don't like locations for configuration data that are evaluated
unconditionally. I've learned that lesson in OpenCard, once and
for all :-) I don't mind a package that can be explicitly called
by an application with a single line of code, though. Like:

HttpParams defaults = ParameterLoader.loadFromSystemProperties();

>> > So: is there any interest in making this part of HttpClient?
>> >
>> > And how best to add it?
>> > - scan for prefixed properties
>> > - read props from httpclient-specific property file
>> > - update code to check system property as last resort.
>> >
>> This sounds reasonable. There's a catch, though. A simple properties
>> file may not be good enough, because some of the HTTP parameters are
>> typed. So, you will have to devise a mechanism to discover the expected
>> type for HTTP parameters.
> There could be an additional "_type" property for values that aren't
> Strings. e.g.
> http.socket.timeout=1000
> _type.http.socket.timeout=Integer

I would have gone for coding the type into the property name:


> Some conversions might be trickier than others...

Yes. If property (or XML?) loading requires a type conversion framework,
we should consider an extra HttpConfig component, either standalone or
as a module of HttpClient.


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

View raw message