Thanx for the quick response ...
Trustin Lee wrote:
Hi Michael,
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.
This means on the other side:
... codecs behind TextLineCodec shouldn't work when all the input was
line based, because all the stuff is decoded yet in TextLineCodec to
single lines?
... if I want to use line separation among with other decoding
algorithms, i must overload TextLineCodec itself or implement codec with
equivalent functionality instead of using it as "preprocessor" in my chain?
Regards
Michael
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
--
_____ Falcom Wireless Communications GmbH ______________________________
Dipl.-Ing. Michael Bauroth
Manager Software Department
Phone: +49 3677 8042 332
Fax: +49 3677 8042 215
E-mail: [EMAIL PROTECTED]
Address: Gewerbering 6, 98704 Langewiesen, Germany
______________________________ www.falcom.de ___________________________
This e-mail and any files transmitted are the property of FALCOM and/or
its affiliates, are confidential, and are intended solely for the use of
the individual or entity to whom this e-mail is addressed. If you are
not one of the named recipients or otherwise have reason to believe that
you have received this e-mail in error, please notify the sender and
delete this message immediately from your computer. Any other use,
retention, dissemination, forwarding, printing or copying of this e-mail
is strictly prohibited.