directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <>
Subject Re: [mina] Refactoring MINA IoFilterChain (Was: IoFilters: DIRMINA-121 / 122)
Date Tue, 15 Nov 2005 12:18:25 GMT
Hi Dave,

I started to like your suggestion, and I'd like to see its realization. :)

2005/11/15, Irving, Dave <>:
> So why don't we just dispatch based on IoSession??
> I.e, we have something like a "ConnectionChains" class which holds all
> chains - mapped against IoSessions.
> The final filter of a sub-chain (sessionManager chain, port chain,
> session chain) is set by ConnectionChains to some private inner class.
> When the last filter of a sub-chain is invoked, ConnectionChains does a
> ( O(1) ) look up for the correct ConnectionChain based on session and
> delegates.

Good idea. Perhaps we can use session attributes here?

This allows us to get all the benefits previously discussed and solves
> the NextFilter problem (including completely asyncronous calls to
> NextFilter) without requiring cloning (which could be costly for some
> filters).
> How does that sound?

Sounds cool.

BTW J-F once asked us about emitting an event virtually (not a real I/O
event but fabricated one). I guess we can support this in our
ConnectionChain by exposing event emitting methods like I did in

what we call human nature is actually human habit

View raw message