hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Arnott <b...@aungate.com>
Subject HttpConnectionParams
Date Thu, 19 Apr 2007 11:54:27 GMT
Is there a reason why HttpConnectionParams doesn't extend BasicHttpParams?
I'm having a play and am trying to create a HTTP Server based on the
non-blocking example.

I've been trying to use Spring to inject all the necessary bits together,
but I see no way of creating a HttpParams object. The reason for this is
all the setX methods on HttpConnectionParams take a HttpParams object. Also,
all the methods on BasicHttpParams take two properties as well, i.e. key +
value, so I can't do:

<bean id="connectionParams" class="org.apache.http.params.HttpConnectionParams">
   <property name="soTimeout"            value="5000" />
   <property name="socketBufferSize"     value="8192" />
   <property name="staleCheckingEnabled" value="false" />
   <property name="tcpNoDelay"           value="true" />

Which I can in HttpClient:

<bean id="httpClient" class="org.apache.commons.httpclient.HttpClient">
     <bean class="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager">
       <property name="params">
         <bean class="org.apache.commons.httpclient.params.HttpConnectionManagerParams">
           <property name="defaultMaxConnectionsPerHost" value="10" />
           <property name="maxTotalConnections"          value="20" />
           <property name="connectionTimeout"            value="7000" />
           <property name="linger"                       value="-1" />
           <property name="receiveBufferSize"            value="4096" />
           <property name="sendBufferSize"               value="4096" />
           <property name="soTimeout"                    value="900000" />
           <property name="staleCheckingEnabled"         value="true" />
           <property name="tcpNoDelay"                   value="true" />
   <property name="params">
     <bean class="org.apache.commons.httpclient.params.HttpClientParams">
       <property name="connectionManagerTimeout" value="10000" />
       <property name="contentCharset"           value="UTF-8" />

Are there any plans to provide for this kind of functionality, or am I going
to have to write my own implementation of HttpParams...?


Bob Arnott

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

View raw message