commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Mathieu <mathi...@zoe.cea.fr>
Subject Re: [httpclient] MultiThreadedHttpConnectionManager : connections available
Date Thu, 10 Apr 2003 07:00:55 GMT
Hi Adrian,

These methods exists in alpha2, and I tried your proposition. But it seems 
that getConnectionsInUse returns the connections created for the host and not 
the connections available. I think it is the same bug as the one Mike Becke 
is fixing ...

Do you think it is possible to add a non blocking version of 
getConnection(HostConfiguration) in MultiThreadedHttpConnectionManager ? It 
would return a connection if one exists or can be created, or return null if 
no connections are available ...

thanks

Benoit


Le Jeudi 10 Avril 2003 00:22, Adrian Sutton a écrit :
> Hi Benoit,
> I think what your looking for is:
>
> HostConfiguration hostConfiguration = new HostConfiguration();
> hostConfiguration.setHost("myhost.com");
> // Optionally set the proxy information for the host configuration as
> well.
>
> manager.getMaxConnectionsPerHost() -
> manager.getConnectionsInUse(hostConfiguration);
>
> I'm not sure when those specific methods were added, you may need to
> upgrade
> to alpha3 or possibly even a recent nightly build.  We anticipate beta 1
> will be release in the next week or so and that will definitely include
> these methods.
>
> You may also be interested in the work that Mike Becke is doing with
> MultiThreadedHttpConnectionManager to make it more configurable.  See
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18596
>
> Hope that helps,
>
> Adrian Sutton, Software Engineer
> Ephox Corporation
> www.ephox.com
>
>
> -----Original Message-----
> From: Benoit Mathieu [mailto:mathieub@zoe.cea.fr]
> Sent: Wednesday, 9 April 2003 9:29 PM
> To: Jakarta Commons Users List
> Subject: [httpclient] MultiThreadedHttpConnectionManager : connections
> available
>
>
> Hi all,
>
> I'm using HttpClient with an MultiThreadedHttpConnectionManager (MTHCM),
> and
>
> i'd like to know how many "connection are available" for a
> HostConfiguration
>
> ("connection available" means free connections + connections i can
> create if
>
> maxConnection had not been reached). I found no method for that in the
> MTHCM.
> I use httpclient 2.0 alpha2.
>
> Does anybody have an idea ?
>
> thanks for your help
>
> Benoit
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message