Le mardi 02 janvier 2007 à 14:16 +0100, Michael Bauroth a écrit : > Hi Niklas, > > indeed it seems, that there are better solutions :) > > What I want to do is to implement a send queue for each session. This > send queue should hold several (more than once) objects already sent or > awaiting to send to a specific client. > > Each of the objects can / must be send more than once because it can > happen, that while the transaction (GPRS) data get's lost. After a > specified amount of retries the object must be dropped and the sender > must be informed, that there was a problem. > > On the other side the objects / commands should be removed from the > queue, when the server get's a response from the client dedicated to a > specific command (mapped over id's). > > > Ok, I can add a queue to a session over setAttribute. I can use > IoSession.write(Object) to forward a specific command to the client. I > can use an encoder and / or messageSent(IoSession, Object) to put the > command to the "attributed" queue and messageReceived to remove it from > there. > > Seem's that it is ... WDYT? > > Best Regards > Michael
Hi Michael, I think the best way is to implement that as an IoFilter you will plug in your filterChain when you need this transport behaviour. Julien
