directory-dev mailing list archives

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

> My understanding of Niklas e-mail was that his main reason WAS spring.

At the moment though, a handler which wants a certain filter per port
must have this logic (directly, or injected) in the handler.
It seems like a nice feature to be able to specify filters on a per
acceptor and port level.

> As long as you have addBefore/addAfter (which exist on 0.8, not sure
about 0.9) you will have to clone, 
> as the filter chain is mutable. The best you can do is to implement
lazy copy. I do not see a real way out of it.

A mutable chain is fine with the proposed approach. The implementation
details have been discussed in earlier emails, but basically an owning
"CommandChains" (or something) class fixes the head and tail of
sub-chains (which users cant do) to manage sub-chain routing.
What this means is that whatever a user can currently do to a filter
chain, they will still be able to do after the chain.

> So what happens when I call IoFilterChain.addFirst() on
sessionCreated(). As I said the best you can do is lazy copy.

I don't think so. The filter chain a ** user ** is exposed to is just
the per session chain. The user can still make any changes to this as
they desire. They can clear it if they want! 
The crucial bit is that the implementation (which the user doesn't see)
has fixed head and tail filters to manage the sub-chain routing. Users
can play with the filters all they want.

Hope this is clearer

> Jose Alberto


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.

View raw message