hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: Gracefully interrupting file posts
Date Mon, 29 Jan 2007 17:04:05 GMT
Hello Andrew,

> I'm looking for a graceful way to interrupt one or indeed all HTTP
> file posts/uploads from my application. I don't need to continue these
> uploads.

"graceful way to interrupt" is an oxymoron. If you don't need
to continue, make sure an exception is thrown so that the
HttpClient layers between your stream and your application can
perform the necessary cleanups and won't wait for a response
from the server or any such thing.
HttpMethod.abort() is the preferred way since it will interrupt
the thread even if it is currently blocked in a native IO operation.


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

View raw message