hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: How to set connection properties in httpClient
Date Fri, 07 Sep 2007 15:32:48 GMT
On Fri, 2007-09-07 at 20:43 +0530, Techie India wrote:
> 4.0a1
> 

_BE_ _WARNED_: unlike HttpCore, HttpClient 4.0 is still in a very early
stage of development. There will be a lot of API changes and code
instability. Generally we discourage people from using it _unless_ they
intend to contribute patches to the project or help us define the API.  


> > On Fri, 2007-09-07 at 15:33 +0530, Techie India wrote:
> > > Hi,
> > >
> > > Can you please tell me how i will set the properties for
> > > 1)StaleConnection
> > > 2)Max. Total Connection
> > > 3)Max. Connection per host
> > >


HttpParams params = new BasicHttpParams();
HttpConnectionParams.setStaleCheckingEnabled(params, true);
HttpConnectionManagerParams.setMaxTotalConnections(params, 200);
HttpConnectionManagerParams.setDefaultMaxConnectionsPerHost(params, 20);
DefaultHttpClient  httpclient = new DefaultHttpClient(params);

Hope this helps

Oleg

> > >
> > > in HttpClient Module.
> > >
> >
> > What version, 4.0a1 or 3.1?
> >
> > Oleg
> >
> > > Thanks.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > httpcomponents-dev-help@jakarta.apache.org
> >
> >


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


Mime
View raw message