directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daune...@daune-consult.com
Subject Re: [mina] To repeat sessionIdle event or not?
Date Tue, 06 Sep 2005 08:22:58 GMT
Trustin Lee <trustin@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



Mime
View raw message