hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: HttpClient under load
Date Thu, 03 Feb 2005 13:32:52 GMT
Hi Prasad,

> I am trying to implement a "fetch timeout" feature using the http
> client. Basically it means that if I have not received a complete
> response within "n" seconds then I need to return a fetch timeout.
> Is there any built in mechanism in HttpClient for this or do I need to
> have a monitor thread that calls HttpMethod.abort() after the timeout
> period (if the method has not finished execution). What would be the
> result of calling the abort method on the worker thread? (what
> exceptions etc..). Please advise if there are any better ways to
> implement the same.

HttpMethod.abort() is the way to go.  You will need to keep track of 
the execution time and abort the methods from a separate thread.  
Calling abort will most likely cause an IOException but it depends 
where exactly the method is in the process of execution.

Mike


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