Le 7/26/13 12:32 PM, Jose María Zaragoza a écrit :
> OK. Thanks.
>
> One question more:
>
> if I create a new filter  (iofilter1 ) , so I have
>
>
> iohandler -------> iofilter1
>
>
> When I receive a message , messageReceived on iofilter1 is executed
> and , finally , messageReceived on iohandler is executed
>
> If I put the code that sends "test" in iofilter1 and  "( doing other
> stuffs )" in iohandler's messageReceived
> would it work ? i mean , would be "test" sent before iohandler's
> messageReceived is executed?

No. The sending of messages is done after the messageReceived event has
been fully processed. The filters are always processed *before* the
IoHandler is called but each write is pushed to a queue which is
processed later on.

On MINA 3, we have changed slightly this behavior : f we can send the
message immediately, we do so, but if the socket get full, we have to
enqueue the message.

All in all, just consider that you have *no guarantee* whatsoever that
the message will be sent when you do so : this is a Non Blocking
framework...


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to