So if I add three filter and the three filter(filter1, filter2, filter3)
must be execute from head to tail (first to last).  Both of client and
server side will be add the three filters.  When the server receive the
message from client , the method messageReceived will be fired and the
message will travel through filter1 filter2 filter3,  maybe when I invoke
session.write(message) in method messageReceived  I also want to the message
travel through filter1 filter2 filter3,  then how to do realize it?  and I
think the filter consuming by session.wirte (close) and messageReceive() is
a little inconsistent. How do you think so ?



No, no limitation. The reason is that these events are generated by your
code and consumed by MINA. They are typically generated from within your
IoHandler by a call to session.write() or session.close() and will
travel through the filter chain in the opposite direction (last filter
in chain will see the event first). The other events are instead
generated by MINA and will be consumed by your IoHandler.

--
Niklas Therning
www.spamdrain.net


Reply via email to