hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Defining preferences using properties
Date Thu, 14 Sep 2006 17:53:41 GMT
On 14/09/06, Oleg Kalnichevski <olegk@apache.org> wrote:
> On Thu, 2006-09-14 at 18:09 +0100, sebb wrote:
[...]

> > There could be an additional "_type" property for values that aren't
> > Strings. e.g.
> >
> > http.socket.timeout=1000
> > _type.http.socket.timeout=Integer
> >
> > Some conversions might be trickier than others...
> >
>
> It just thought that a map of parameter names to a corresponding
> instance of java.beans.PropertyEditor might be the most elegant solution
> to this problem.
>
> Map paramEditorMap = new HashMap();
> paramEditorMap.put("type.http.socket.timeout", new IntegerEditor());
>

Not sure I understand how to use the IntegerEditor() here - I thought
the PropertyEditor classes were intended for GUIs only?

Also, this means knowing all the (non-String) property names in
advance, even if they are not needed...

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


Mime
View raw message