hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject Re: Timeout Configuration
Date Wed, 17 Aug 2005 05:29:16 GMT
Hi Peter,

the second version can't work, since you set the value
for a single connection, which is not returned to the
connection manager and can therefore no longer be used
by the HttpClient.

The first version should work, since the connections
get their default parameter values from the connection
manager.

If it is to apply for all connections in all managers, you
can also set the value directly in the default parameters,
which provide the defaults for all values not set explicitly
anywhere else.

hope that helps,
  Roland




Peter Luttrell <Peter_Luttrell@mgic.com> 
17.08.2005 00:19
Please respond to
"HttpClient User Discussion"


To
httpclient-user@jakarta.apache.org
cc

Subject
Timeout Configuration






How do i configure the "http.connection.timeout" under the "HTTP 
connection
parameters"?

Will this work:

      HttpClient client = new HttpClient( new
MultiThreadedHttpConnectionManager() );
      client.getHttpConnectionManager().getParams().setParameter(
"http.connection.timeout", new Integer( 30 * 1000));

I don't think it will because the docs indicate this setting at the
connection level....so would this work?

      HttpClient client = new HttpClient( new
MultiThreadedHttpConnectionManager() );
      client.getHttpConnectionManager().getConnection(
client.getHostConfiguration() ).getParams().setParameter(
"http.connection.timeout", new Integer( 30 * 1000));

This seams a bit weird that I'd need to pass in the
HostConfiguratation...and also is the Connection instance here discarded
because it's not actually, making the change meaningless?

-peter


---------------------------------------------------------------------
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