Thanks a lot Geert.

This helps. I am implementing Text Line based protocol over SSH. Obviously SSH will be as codec. And then I need my protocol to be gathering bytes upto the EOF in order to parse it further. So my second 'codec' based filter must be 'cumulative' as well. Therefore it will be more complex but doable, I hope.

One more question about your example: I do not understand the role of messageSent method.

I thought that messageSent is called once message has been sent out to socket. At that point message is of type ByteBuffer (in mina 1.1.7 and IoBuffer in mina 2).

Do you mind to shed some light on this?

Thank you,

Jozef


Geert Schuring wrote:
Jozef,

I wrote an article on how to do this using MINA 2.0.0:
http://geertschuring.wordpress.com/2008/08/18/how-to-use-the-mina-iofilter/

perhaps it applies to MINA 1.1.7 as well. I don't know as i've never
used MINA 1.*

Basically you have to create an IoFilter instead of a Codec because the
codec interface doesn't allow it to receive high level objects from
another codec.

Greets,
Geert.

On Mon, 2008-09-15 at 16:35 -0400, jlesniak wrote:
Hello,

I am developing multilayer protocol using Mina 1.1.7.

I noticed that there is a comment stating that it can only be one codec filter in the filter chain.
Why is this restriction? and can I work around it?

Thank you,

Jozef





Reply via email to