mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: [MINA 3.0] Initial thoughts on FilterChain
Date Mon, 14 Dec 2009 09:19:18 GMT
Ashish a écrit :
>> Agreed, the SM approach should cover all cases; even the logging case in
>> your subsequent post.
>> So with that said, would it not make sense to have a set of fixed filter
>> chains w/ each chain representing a state rather than a bucket of filters
>> with each filter deciding the next filter to execute?
> Sorry , but I am confused :-(
> can you help me understand how the Filter chains as a state would work?
> Here is a simple Chain. The one with * can be dynamically
> added/removed. Logging filter could be added at multiple places
> Acceptor -> BlackList Filter -> Logging Filter* -> Throughput Filter*
> -> Executor Filter -> Codec -> Logging Filter *
> ->IoHandler
> Now how would the suggested approach work??
If I understand Alan, the idea is that the transitions are managed by 
the SM handler. As state are static, transitions just depend on th 
context, so an external engine can call the next state considering the 
current context. In this case, states don't have to know which is the 
next state, because it's computed in the SM engine.

It's a typical SM approach, but I'm not sure that it's convenient for us 
(see my other reply).

Emmanuel Lécharny

View raw message