You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by jian wu <he...@gmail.com> on 2006/12/04 20:44:34 UTC
Question about IoHandler.sessionIdle v.s. IoHandler.exceptionCaught
Hi,
I have a question regarding IoHandler.sessionIdle()/exceptionCaught():
Since in Mina Exception will be passed to IoHandler internally as
an event, so,
when an IOException happened, Mina handled it and passed it to
IoHandler and
related Filter Objects, will Mina treat this as an normal IoEvent
and reset the
SessionIdel to re-start counting or continue to count since it is
abnormal? Will
this logic be the same among Mina 0.9.4 and 1.0?
Thanks a lot for your help!
Jian
Re: Question about IoHandler.sessionIdle v.s. IoHandler.exceptionCaught
Posted by Trustin Lee <tr...@gmail.com>.
On 12/5/06, jian wu <he...@gmail.com> wrote:
>
> Hi Trustin,
>
> > In case of IOException, the session will be closed automatically,
> > so it actually doesn't matter. :)
>
> Will Mina guarantee that IoHandler.exceptionCaught() will be
> invoked before IoHandler.sessionClose()?
Yes. If not, please let us know.
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
Re: Question about IoHandler.sessionIdle v.s. IoHandler.exceptionCaught
Posted by jian wu <he...@gmail.com>.
Hi Trustin,
> In case of IOException, the session will be closed automatically,
> so it actually doesn't matter. :)
Will Mina guarantee that IoHandler.exceptionCaught() will be
invoked before IoHandler.sessionClose()?
Thanks a lot for your quick reply!
Jian
On 12/4/06, Trustin Lee <tr...@gmail.com> wrote:
> Hi Jian,
>
> On 12/5/06, jian wu <he...@gmail.com> wrote:
> >
> > Hi,
> >
> > I have a question regarding IoHandler.sessionIdle()/exceptionCaught():
> > Since in Mina Exception will be passed to IoHandler internally as
> > an event, so,
> > when an IOException happened, Mina handled it and passed it to
> > IoHandler and
> > related Filter Objects, will Mina treat this as an normal IoEvent
> > and reset the
> > SessionIdel to re-start counting or continue to count since it is
> > abnormal? Will
> > this logic be the same among Mina 0.9.4 and 1.0?
>
>
> It won't reset the idle counter. The logic remains the same both in 0.9.xand
> 1.0.x.
> In case of IOException, the session will be closed automatically, so it
> actually doesn't matter. :)
>
> HTH,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP key fingerprints:
> * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
> * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
>
>
Re: Question about IoHandler.sessionIdle v.s. IoHandler.exceptionCaught
Posted by Trustin Lee <tr...@gmail.com>.
Hi Jian,
On 12/5/06, jian wu <he...@gmail.com> wrote:
>
> Hi,
>
> I have a question regarding IoHandler.sessionIdle()/exceptionCaught():
> Since in Mina Exception will be passed to IoHandler internally as
> an event, so,
> when an IOException happened, Mina handled it and passed it to
> IoHandler and
> related Filter Objects, will Mina treat this as an normal IoEvent
> and reset the
> SessionIdel to re-start counting or continue to count since it is
> abnormal? Will
> this logic be the same among Mina 0.9.4 and 1.0?
It won't reset the idle counter. The logic remains the same both in 0.9.xand
1.0.x.
In case of IOException, the session will be closed automatically, so it
actually doesn't matter. :)
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6