Yes, that's correct. And that's why our DataChannel classes establish the connection; they're the handlers for that session. It's also why we have slightly modified the SingleSessionIoHandlerDelegate so that we can specify ahead of time the handler to use. The one in MINA creates the handler from a factory, which is slightly less useful unless you can tell from the session itself what to do.
In other words, we do this: 1. Create a new handler based on what we need for this connection 2. Establish a new connection 3. Set the new session to use the created handler 4. Repeat for other connections using different handlers. On Wed, Mar 11, 2009 at 2:24 PM, Emmanuel Lecharny <elecha...@apache.org> wrote: > Squee wrote: >> >> No, as I already explained, Demuxing handler won't work. The demux >> handler determines which handler to use based on the individual >> messages, while we need to determine which handler based on the >> session. The messages are the same, but the handlers for different >> sessions are not. >> > > Let me see if I understand the full context : > - you establish a session, and doing so, you associate a handler to it > - then this handler is triggered when message are exchanged. > > Q : how do you determinate which handler to select when establishing the > session ? Is there any external criterium for that ? > > > -- > -- > cordialement, regards, > Emmanuel Lécharny > www.iktek.com > directory.apache.org > > >