You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Trustin Lee <tr...@gmail.com> on 2005/09/06 08:02:03 UTC

[mina] To repeat sessionIdle event or not?

Hi guys,

There has been quite a lot of requests and questions about sessionIdle event 
because it is fired only once since I/O occurred. It means there's no other 
way to make MINA fire sessionIdle event than performing I/O after the event 
is fired. It looks like many persons expect sessionIdle event is fired 
periodically.

Should we change this behavior, or provide some way to configure this? If we 
have to choose the latter, how?

Any ideas will be appreciated.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [mina] To repeat sessionIdle event or not?

Posted by Trustin Lee <tr...@gmail.com>.
Oops, sent to wrong address.

2005/9/6, Trustin Lee <tr...@gmail.com>:
> 
> Hi J-F, 
> 
> 2005/9/6, daune.jf@daune-consult.com <da...@daune-consult.com>: 
> > 
> > If event is fired periodically, it is easy to detect first occurrence 
> > (using a
> > Session attribute) and ignore others. The opposite is not true: if it is 
> > fired 
> > once, and you want periodic notification, you are done.
> > 
> > A more elegant solution would be pluggable strategy (FireOnce and
> > FirePeriodically)
> 
> 
> Thank you for your great idea. I decided to modify MINA to fire 
> sessionIdle events periodically. Users will be able to know if it is the 
> first event or not.
> 
> Thanks,
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/ 
> 



-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [mina] To repeat sessionIdle event or not?

Posted by da...@daune-consult.com.
Trustin Lee <tr...@gmail.com> a écrit :

> Hi guys,
>
> There has been quite a lot of requests and questions about sessionIdle event
> because it is fired only once since I/O occurred. It means there's no other
> way to make MINA fire sessionIdle event than performing I/O after the event
> is fired. It looks like many persons expect sessionIdle event is fired
> periodically.
>
> Should we change this behavior, or provide some way to configure this? If we
> have to choose the latter, how?
>
> Any ideas will be appreciated.
>
> Trustin

If event is fired periodically, it is easy to detect first occurrence (using a
Session attribute) and ignore others. The opposite is not true: if it is fired
once, and you want periodic notification, you are done.

A more elegant solution would be pluggable strategy (FireOnce and
FirePeriodically)

My 2 cents,

J-F