directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ersin Er <ersin...@gmail.com>
Subject Re: [MINA] Filter Chain internals
Date Wed, 25 Jan 2006 19:12:18 GMT
On 1/25/06, Niklas Therning <niklas@trillian.se> 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
Mime
View raw message