Hi,
I've just a short question about the correct handling of decoded data in
the context of a clean pipeline implementation.
Assume that I have a protocol, which contains some embedded key-value
pairs. The current implemented behaviour decodes this data, convert it
to POJO's and forwards it to the SessionHandler, where the data then is
processed further. The disadvantage of this handling is, that I need for
each key-value pair at least 1 POJO class (and have much construct -
destroy - garbage collect + data streaming stuff).
Now my question: What do you think from the Mina design point-of-view
about the following solution? I decode the key-value pairs in my
decoders, store it in the related session hash map and don't forward any
ProtocolDecoderOutput to the handler. Only when some data is disrupted
or the whole message is received, the decoder "fires" a "message
completed" info over the ProtocolDecoderOutput to the handler, so that
the handler can process the data, which were previously stored in the
session.
WDYT
Best Regards
Michael