You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by ht...@jrapid.com on 2004/05/27 21:33:36 UTC
MultiThreadedHttpConnectionManager.setMaxConnectionsPerHost
I was wondering why this method was depricated, currently I use:
MultiThreadedHttpConnectionManager.getParams().setIntParameter("http.connect
ion-manager.max-per-host",20);
Which fairly un-intutive, as compared to the earlier method
setMaxConnectionsPerHost(20), which is depricated now.
Any one has idea?
--Satya
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
Re: MultiThreadedHttpConnectionManager.setMaxConnectionsPerHost
Posted by Oleg Kalnichevski <ol...@apache.org>.
Satya,
We still need to document the new preference architecture and explain
its benefits.
Firstly and most importantly the new preference architecture is
hierarchical in structure which enables the users to apply a particular
option at any specific level:
Global ->
HttpClient (agent) ->
HostConfiguration (host) ->
HttpMethod (request)
HttpConnectionManager (connection manager) ->
HttpConnection (connection)
One can set a parameter at the global level and make it apply at all
levels down the hierarchy if it is not explicitly set to a different
value there.
Secondly, having several dozen seldomly used setters/getters methods
makes things hardly any better. New preference architecture helps us
keep the API cleaner and simpler.
Thirdly, it enables us, the developers, to extend HttpClient
capabilities with minimal or no API changes at all
Oleg
On Thu, 2004-05-27 at 21:33, http-client@jrapid.com wrote:
> I was wondering why this method was depricated, currently I use:
>
> MultiThreadedHttpConnectionManager.getParams().setIntParameter("http.connect
> ion-manager.max-per-host",20);
>
> Which fairly un-intutive, as compared to the earlier method
> setMaxConnectionsPerHost(20), which is depricated now.
>
> Any one has idea?
>
> --Satya
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org