> Emmanuel Lecharny [mailto:[EMAIL PROTECTED] wrote: > > I'm not sure I see what you mean here. Let me clarify : > - should we have init/destroy(session) methods replacing the > preAdd/postRemover methods ?
Erm, Yes that's what I meant. > > This way, the "if (chain.contains(this))" could be removed from the > filter implementations. > > > Those checks are pretty painful. But if the filter can be added only > once by design, we need to have them, otherwise we rely on user's > wisdom, which is dangerous ;). Ie, I think they are like a safety net > for the base case. Not sure we need them though, this is much a design > decision than a technical one. Yes, they can take a long time, but think about how long a filter chain is and how often a filter is added or removed. Nonetheless a lot of filters does this check already and some more doesn't but should do... > > Sounds a bit comlicated from a users point of view. Maybe we can use > an interface here, too. > > The add and remove method can check if the filter implements the > interface and call the method as needed. > > > Yeah. I have to rethink this part a bit... > > Thanks ! No problem, an even better design of mina makes my life even more easier ;) So I have to thank you for reviewing. Steve
