Hi! You can get all the managed sessions through the method call "getManagedSessions"
For instance: // instantiate a new InetSocketAddress for binding on localhost:9999 InetSocketAddress serverAddress = new InetSocketAddress(9999); // instantiate a new SocketAcceptor SocketAcceptor socketAcceptor = new SocketAcceptor(); // Get all managed sessions indicating the InetSocketAddress instance Set<IoSession> sessions = socketAcceptor.getManagedSessions (serverAddress); // now you can iterate the sessions for (IoSession session : sessions) { // do something with session } Bye ! On 10/30/06, Hieu Phan Thanh <[EMAIL PROTECTED]> wrote:
Hi all, How could I manage all opened sessions? Does MINA support me to do that? Currently, I use a list which will add *session* when mina invoked the sessionCreated() method in IoHandler. Am I correct? Please advice me. Thanks & best regards, Hieu Phan.
-- Alessandro Torrisi Information Technology Consultant [EMAIL PROTECTED] "Questo documento è formato esclusivamente per il destinatario. Tutte le informazioni ivi contenute, compresi eventuali allegati, sono soggette a riservatezza a termini del vigente D.Lgs. 196/2003 in materia di "privacy" e quindi ne è proibita l'utilizzazione. Se avete ricevuto per errore questo messaggio, Vi preghiamo cortesemente di contattare immediatamente il mittente e cancellare la e-mail. Grazie."