hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: PATCH: HttpConnection cleanup
Date Wed, 05 Nov 2003 10:57:46 GMT
> I think close and flush should still throw recoverable exceptions, when 
> the connection has been used.  This will allow methods to be retried in 
> the event of an error on close/flush.  Other than that it looks good.

Mike,
So be it. I'll leave alone close/flush of the wrapper stream.

If there are no other complaints/comment/suggestions, I'll commit the patch tonight (around
20:00 GMT)

Oleg

On Nov 4, 2003, at 12:06 PM, Kalnichevski, Oleg wrote:

> Folks, any feedback to this one so far?
>
> Oleg
>
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org]
> Sent: Sunday, November 02, 2003 17:07
> To: Jakarata Commons HttpClient mailing list
> Subject: PATCH: HttpConnection cleanup
>
>
> Folks,
>
> This patch has been prompted by the questions/concerns raised by Fabio
> <linea at libero.it>. Let's face it, HttpConnection has got a bit messy
> with all the numerous changes made recently. In particular the 
> exception
> handling especially with regards to handling recoverable exceptions and
> timeouts got muddy. This patch attempts to address the problem
>
> changelog:
>
> - Socket input stream now wrapped with a wrapper class that re-throws
> certain type of generic IO exceptions as HttpClient specific 
> exceptions.
> In particular java.io.InterruptedIOExceptions are re-thrown as
> IOTimeoutException
> - java.io.InterruptedIOExceptions in HttpConnection#open() re-thrown as
> ConnectTimeoutException
> - HttpConnection#write(byte[], int, int) used to throw
> HttpRecoverableException in case of getting absolutely messed up
> parameters. changed to throw IllegalArgumentException instead
> - HttpConnection#write(byte[], int, int) does not do any exception
> handling anymore, since this is clearly a prerogative of the
> WrappedOutputStream
> - 'used' flag in HttpConnection was set to true only upon the 
> connection
> release. Why? Was there any reason for this kind of behavior? That 
> doest
> not seem right to me. Changed to set 'used' flag upon first successful
> write operation. Mike, please have a close look. Let me know if you
> disagree with the change. It can well be that I missed something
> important.
> - close() and flush() in WrappedOutputStream no longer throw
> HttpRecoverableExceptions. I believe this kind of exceptions are too
> severe to be automatically recovered from
>
> Let me know what you think
>
> Oleg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> commons-httpclient-dev-help@jakarta.apache.org
>


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


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


Mime
View raw message