On 7/11/11 7:14 PM, Alan D. Cabrera wrote:
On Jul 10, 2011, at 10:23 PM, Julien Vermillard wrote:
On Mon, Jul 11, 2011 at 1:51 AM, Alan D. Cabrera<[email protected]> wrote:
What would a user put as an implementation to this method? I'm wondering how
useful it is.
Regards,
Alan
I use to close session on ProtocolDecoderException in
IoHandle#exceptionCaught. Since we removed the IoHandler and only use
IoFilter, I think we need this event in IoFilter.
I was thinking that if an exception is thrown by a filter then the session
should be closed.
It's up to the Handler implementer to decide to close the session, or
not. However, I think it's a good policy to default to such an action,
if the implementer hasn't overriden the event.
I think this should be a hard and fast policy that is enforced by our
framework. With that said then what we need is a lifecycle method:
void processSessionHalted(IoSession session)
The method processExceptionCaught() strikes me as being too vague.
Well, it's generic because you may get many kind of exception.
In some case, we can probably have another event like the one you are
proposing. However, if the session is already closed, the
sessionClosed() event will be propagated to the handler anyway.--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com