Hi guys,
as I was cleaning and documenting
(http://cwiki.apache.org/confluence/display/MINA/ProtocolCodec+discussion)
the current ProtocolCodecFilter, I was thinking that there is room for a
simpler implementation, which is not event based.
The current Decoder invokes a callback when it has decoded one or more
message. A simpler codec will simply return a list of decoded message
(or even better, an MessageInputStream), and the filter will just have
to loop on this list (or InputStream), sending the messages to the
nextfilter.
It will simplify greatly the API for those who have to implement a
codec, IMO.
The encoder is even simpler, as we won't encode more than one message at
a time, so it will just return a IoBuffer (or a bytes InputStream) which
will be pushed to the next filter.
wdyt ?
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org