Well, I'd have to go look at the code again to be fully sure, but we have a client layer built on top of MINA for the GUI part of our app, where we pull a ton of data from a remote server for viewing. When a GUI element needs data for its local cache, it creates a "DataChannel" object which performs the necessary connections with MINA. It then synchronously waits for the session to connect before continuing. The DataChannel class is a SingleSessionIoHandler implementation, and our IoHandler is a SingleSessionIoHandlerDelegate. Each DataChannel subclass provides different IoHandler functionality (same protocol, different roles and data to manage).
This allows us to have completely different handlers for the different data caches, while still using the same protocol messages for each cache. (i.e. a response from the server to clear the local cache is exactly the same, but handled differently depending on the data) This is preferable in this instance over the demuxing for this reason, as well as the encapsulation that having all of our data handling on our DataChannel IoHandlers helps with. The biggest problem I had with it was that I had to subclass SingleSessionIoHandlerDelegate to allow us to use our already created DataChannel class (again, an implementation of SingleSessionIoHandler), rather than creating them AFTER the session was created, but that's probably very specific to our way of using it. Basically, our version doesn't use the factory and sets the session on an existing specified SingleSessionIoHandler when the session is created. On Tue, Mar 10, 2009 at 2:38 AM, Julien Vermillard <jvermill...@archean.fr> wrote: > Ok so, why not keep it ? > Would be a great help if you can explain how it's working and how it's > suposed to be used. > > Julien > > Le Mon, 9 Mar 2009 13:07:34 -0600, > Squee <squees...@gmail.com> a écrit : > >> I actually use it in our product, though I believe I subclass the >> handler rather than using it directly. If the functionality is >> removed, it's not HUGE loss and I can just do it myself, but it is >> useful for certain applications. >> >> 2009/3/9 Maarten Bosteels <mbosteels....@gmail.com>: >> > Never used it. >> > >> > Maarten >> > >> > On Mon, Mar 9, 2009 at 12:04 PM, Edouard De Oliveira >> > <doe_wan...@yahoo.fr>wrote: >> > >> >> >> >> +1 ... >> >> >> >> Cordialement, Regards, >> >> -Edouard De Oliveira- >> >> http://tedorg.free.fr/en/main.php >> >> >> >> >> >> >> >> ----- Message d'origine ---- >> >> De : Emmanuel Lecharny <elecha...@apache.org> >> >> À : dev@mina.apache.org >> >> Envoyé le : Lundi, 9 Mars 2009, 11h57mn 27s >> >> Objet : Re: SingleSessionIoHandlerDelegate >> >> >> >> Julien Vermillard wrote: >> >> > Hi, >> >> > someone use the SingleSessionIoHandlerDelegate and the >> >> > org.apache.mina.handler.multiton package ? >> >> > >> >> > I feel like CTRL+A DELeting it, except someone use it. >> >> > >> >> > Julien >> >> > >> >> I don't even know what is this good for ... >> >> >> >> -- >> >> -- >> >> cordialement, regards, >> >> Emmanuel Lécharny >> >> www.iktek.com >> >> directory.apache.org >> >> >> >> >> >> >> >> >> > >