Julien Vermillard wrote:
The decoder could be multi layered the the encoder not.
There is something missing in this sentence. Can you clarify ?
"The decoder could be multi layered AND the encoder not."
sorry for the typo :)
for example you can imagine having a cumulative filter for decoding
which is not needed for encoding.
Or compressing one way and not one other, so you doesn't need the
decompression part of the filter.
If we have two chains, this problem will be automatically solved.
<snip/>
Perhaps we need to
kill this one with this refactoring, elsewhere you will need to do
all the "I preserve the initial message for triggering
IoHandler.sentMessage(..)" in your new code.
Can you elaborate a bit ? I'm not sure that those two problems
overlap, but I may miss something, too.
In IoFilter interface :
public void messageSent(NextFilter nextFilter, IoSession session,
Object message)
which is mainly used for providing back the original message (the pojo)
to the IoHandler and other filters when the final bytes of this message
are wrote. I don't know exactly the implementation details but it have
his root in the fitlerchain code.
IMO, if we are using a WriteFuture, assuming that it has the correct
listener (which does not seems to be the case), then such a messageSent
method seems to be quite useless. Or using WriteFuture is a
duplication... All in all, I would rather keep the WriteFuture and ditch
the messageSent() method.
But I may miss something, this is not a part of the code I have a deep
knowledge on.
Thanks !
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org