Hi Michael, On 4/12/06, Michael Bauroth <[EMAIL PROTECTED]> wrote: > > Hi, > > sorry for the cross-posting (original question is located in > 'Implementation details'). On the other side I think it's meaningful to > extract this question out there because it could be helpful for other > developers too.
No problem. :) My question: What happens with the output (ProtocolDecoderOutput - > POJOs) of different protocol decoders in a chain? Will it be sent > directly to the IoSession or can I receive and modify it in other > decoders, which are inserted later in the chain? ProtocolEncoder and ProtocolDecoder are wrapped by ProtocolCodecFilter, which is an IoFilter. So It becomes a part of the whole chain for an IoSession. No filters are allowed to send events to IoHandler directly. It's an implicit principal. If you inserted one ProtocolCodecFilter, then it will be passed to IoHandler.messageReceived because there's no more filters in the chain. Otherwise, the object, as a result of decoding, will be passed to the next filter in the chain. You can layer two ProtocolCodecFilters because already decoded messages are not processed by the second ProtocolCodecFilter. Only ByteBuffers will be decoded. You can use this trick to implement your protocol as a multi-layered stack. HTH, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
