I had logic in my IoHandler that was quite complex and there were 3
different parts of the code that could send data back to the client.
Instead of placing a WriteFuture in all 3 places, I put the logic in
messageSent.

I could just define an IoFutureListener that is passed into all 3
WriteFuture's though.  If it makes our lives (as API developers)
easier, then I can change my code (as an end user).

--Mark


On Mon, Nov 3, 2008 at 10:13 AM, Emmanuel Lecharny <[EMAIL PROTECTED]> wrote:
> Mark Webb wrote:
>>
>> I have used MESSAGE_SENT, not sure I agree that it should disappear.
>>
>
> May I ask you in which context you used it ? I'm wondering if we can cover
> your case with WriteFuture ?
>
>> What about situations where MINA is used in a client library?  Won't
>> much of your list be reversed?
>>
>
> That's a very good question ! I don't think it makes any difference. From
> the client side, the incoming events are generated by an outgoing event on
> the server side. Ie, the server write a response, then the client get a
> MESSAGE_RECEIVED event to deal with. In fact, it's really like if you have
> nothing in between the client and the server. The client write a message,
> the server read it, then the server write the response, the client read it.
>
> If you take the protocolCodecFilter, it works the same for the server and
> the client. A message will have to be encoded in both case when writing the
> message (and it's always on the outgoing chain), and decoded when read
> (incoming chain).
>
> I may miss something, but AFAICS, it's absolutely symetric.
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>

Reply via email to