On Wed, 2007-01-24 at 17:03 +0100, Stojce Dimski wrote:
> Oleg,
> 
> What do you mean with 'That would be great to have a Spring 2.0 enabled
> module which one could use to assemble various Http components using
> Spring's DI framework.' ?
>
> As I think there is nothing special in using http-core with spring,
> there is no special needs, http-core components are simple beans and
> therefore those are supported out-of-the-box ?

Hi Stojce,

Not quite. HttpComponents are just plain old java beans, but some Spring
specific plumbing code may still need to written. For instance, some
custom logic might be required when populating HTTP parameters with
values specified in the Spring context file.

Besides, we should probably take advantage of extensible XML authoring
in Spring 2 and provide custom HttpCore / HttpClient tags (section 2.2.3
[1]).

> There are some rough corners although, for example in spring apps there
> is common sense and convention to wrap parameters in properties files
> which are then easily created by beans factories. For using those I had
> to write PropertiesHttpParams class which is simple DefaultHttpParams
> subclass which in constructor copy all properties from argument object
> to itself, so I can use properties beans with spring...
> Do you guys think that using just java.util.Properties is not enough for
> http-xxx family ? I would prefer to use just Properties instead of
> HttpParams simplifying the framework... If we cannot live without
> HttpParams then at least let's extend DefaultHttpParams with constructor
> which copies all params or make a subclass as I did.
> What do you think ?
> 

The difficulty here is that HTTP parameters are typed. The
HttpComponents framework expects a specific type for some parameters
(Long for timeout values and so on). So, there must be way to convert
textual representation of HTTP parameters stored in an instance
java.util.Properties to corresponding typed values.

Oleg

[1] http://www.springframework.org/docs/reference/new-in-2.html

> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to