mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Vermillard <jvermill...@gmail.com>
Subject [MINA 3.0] write future
Date Tue, 06 Sep 2011 13:55:02 GMT
Hi !
actually in MINA 1.0 & 2..0 there is something implemented with an
ugly hack : the future returned by session.write(..)  and
IoHandler#messageSent(..);

The main problem is you usually write a pojo at the session level, and
it's transformed into one or multiple bytebuffer by the chain of
filters. So when the message is actually written at the socket level
by the IoProcessor, it's in a (or more) bytebuffers. So you need to
hide the original pjoo message somewhere (attached to the last
ByteBuffer resulting of the transformation) for completing the write
future and generating the messageSent event.

My first question is : do we need the future on the session.write(..)
? I already made two calls, one with the future and one without (for
saving memory because most of time we don't need it), but perhaps we
can dump this feature ?

Julien

Mime
View raw message