james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin" <robertburrelldon...@gmail.com>
Subject Re: [JAMESHandler] Streams in AbstractJamesHandler
Date Sat, 05 Apr 2008 09:31:44 GMT
On Sat, Apr 5, 2008 at 10:19 AM, Robert Burrell Donkin
<robertburrelldonkin@gmail.com> wrote:
> been staring hard at some of the handler framework
>
>  from AbstractJamesHandler:

<snip>

>  #3 >     } catch (RuntimeException e) {
>  #4 >         StringBuffer exceptionBuffer =
>  #4 >             new StringBuffer(256)
>  #4 >                 .append("Unexpected exception opening from ")
>  #4 >                 .append(remoteHost)
>  #4 >                 .append(" (")
>  #4 >                 .append(remoteIP)
>  #4 >                 .append("): ")
>  #4 >                 .append(e.getMessage());
>  #4 >         String exceptionString = exceptionBuffer.toString();
>  #4 >         getLogger().error(exceptionString, e);
>  #7 >         throw e;

<snip>

>  #7 when an exception is caught, it is immediately rethrown. in this
>  case, are the streams ever closed? do they need to be?

when called from handleConnection(Socket), it will be closed on
handleClean but it's a protected method and so could (potentially) be
called from subclasses. wonder whether subclasses should really be
overriding this method.

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message