Yes, we could I suppose, but it's kinda handy to have only one connector to manage, especially when we need to shut it down and close connections, rather than running to every connector to close it down. Either way works, but it's definitely easier to use a single connector. That was one thing we liked about moving to MINA from using Sockets directly and managing that kind of thing ourselves. And of course all of the other benefits MINA provides :)
On Wed, Mar 11, 2009 at 3:11 PM, Emmanuel Lecharny <[email protected]> wrote: > Squee wrote: >> >> 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. >> > > but then you can also do : > 1. Create the needed handler for your connection > 2. Configure a Connector with this handler, injecting the filters you need > in the chain > 3. Establish the connection > 4. Repeat this with some other Connectors > > No ? Did I missed something ? > > -- > -- > cordialement, regards, > Emmanuel Lécharny > www.iktek.com > directory.apache.org > > >
