hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Connection level timeout settings
Date Thu, 15 Sep 2005 12:13:43 GMT
Presently only socket timeout value can be set on a per method / host /
client basis. Connection timeout can be set on a per connection manager
/ client basis. The only way to work that problem around is to implement
a custom connection manager or a custom protocol socket factory

Oleg


On Thu, Sep 15, 2005 at 12:22:46PM +0200, Roland Weber wrote:
> Hi Guy,
> 
> you can't set the timeout on the connection because you don't know
> which connection is going to be used until you execute the method.
> You can set the timeout for the connection manager, which will affect
> all connections. I think there is also a way to set the timeout based
> on the HostConfiguration, which is probably what you want to do.
> 
> hope that helps,
>   Roland
> 
> 
> 
> 
> Questioner Guy <questioner.guy@gmail.com> 
> 15.09.2005 11:37
> Please respond to
> "HttpClient User Discussion"
> 
> 
> To
> httpclient-user@jakarta.apache.org
> cc
> 
> Subject
> Connection level timeout settings
> 
> 
> 
> 
> 
> 
> I am trying to set the connection timeout at the individual connection 
> level. The following code snippet sets the timeout at the HttpClient level
>   HttpClient client = new HttpClient( new 
> MultiThreadedHttpConnectionManager() );
> client.getHttpConnectionManager().getParams().setParameter("
> http.connection.timeout", new Integer( 30 * 1000));
>  I want to be able to reset the connection timeout to certain web-sites 
> after getting a timeout exception from the call to HttpClient's 
> executeMethod() call. I coudn't figure out a way to get access to the 
> connection allocated to the call. 
>  I am new to HttpClient and I apologize if this a trivial question, but I 
> would appreciate the answer.
>  Thanks.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 

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


Mime
View raw message