On 1/25/06, Niklas Therning <[EMAIL PROTECTED]> wrote: > Ersin Er wrote: > > Hi all and particularly MINA folks, > > > > I have a question about MINA's IO Filter Chain implementation. If a > > chain is composed of filters and every filter (or the message in the > > filter) knows about a single nextFilter, how is MINA making the chain > > work both directions? A nextFilter for a messageWritten method and > > messageRead method should be different logically. Right? So I need > > some explanation here. > > > > Thanks. > > > > -- > > Ersin > > Hi, > > I guess you mean messageReceived and filterWrite?
Ah sorry, I meant messageReceived and messageSent. > The NextFilter actually encapsulates both the next and previous filters > in the chain. When you call nextFilter.messageReceived() > messageReceived() will be called on the next filter. While when you call > nextFilter.filterWrite() filterWrite() will be called on the previous > filter. Ah Ok. Then nextFilter is interpreted differently for specific message types. Cool approach. Thanks for the answer and the excellent arch. > /Niklas -- Ersin
