directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Irving, Dave" <dave.irv...@logicacmg.com>
Subject RE: [mina] Refactoring MINA IoFilterChain (Was: IoFilters: DIRMINA-121 / 122)
Date Tue, 15 Nov 2005 11:01:24 GMT

> So do I! Keep us posted.
(The NextFilter problem)

Ok, I've thought about it, and I can only really think of one solution.
The problem is that it sounds like we have to support completely
asyncronous invocations on NextFilter.
The issue there is that without cloning filters, a given port filter
logically applies to ALL chains it belongs to...

Except that we should remember that a full connection chain is always
associated with a connection (IoSession). And there would always be a
single connection chain per connection.

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.

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?


> /Niklas

Dave


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It
may contain proprietary material, confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any other party. If you are not
an intended recipient then please promptly delete this e-mail and any attachment and all copies
and inform the sender. Thank you.

Mime
View raw message