How is the ScheduledExecutorService a blocking mechanism? Jeff
yz wrote: > I just started playing around with Mina, and I tried searching the archives > for a discussion about this, but I noticed a glaring lack of any > asynchronous scheduling of callbacks. I.e., we can't schedule a > timeout/sleep/delay within this framework. Is this accurate? Is there some > reason why this relatively straightforward and standard feature is not > available in this framework? > > As a workaround, it seems that we must resort to synchronous, blocking > timeout mechanisms (e.g. ScheduledExecutorService). Is the general approach > here to simply save the IoSession (while inside one of the IoHandler > callbacks) and use it (a) from other threads (b) at any time in the future? > If this is the case, meaning the IoSession never changes across the > IoHandler callbacks, then why is IoSession continually passed back into > those callbacks? > > IoSession says it's thread-safe (I assume this implies the thread-safety of > the reactor core as well) but the Filters may not be. How do I tell if a > particular filter is thread-safe? In particular, I'm interested in > LoggingFilter and ProtocolCodecFilter with ObjectSerializationCodec, but for > these there's no mention in the docs regarding their thread-safety. > > Thanks in advance for your answers.
