Iterator l_list = m_selector.selectedKeys().iterator() ; while( l_list.hasNext() ) { SelectionKey l_key = ( SelectionKey ) l_list.next() ; l_key.channel().close() ; l_key.cancel() ; l_list.remove() ; }
        public void run()        {            while ( m_hasStarted.booleanValue() )             {                int l_count = 0 ;                                /*                 * check if we have input waiting and continue if there is                 * nothing to read from any of the registered channels                   */                try                {                    m_monitor.enteringSelect( m_selector ) ;                    maintainConnections() ;                                        if ( 0 == ( l_count = m_selector.select() ) )                    {                        m_monitor.selectTimedOut( m_selector ) ;                        continue ;                    }                }                 catch( IOException e )                {                    m_monitor.selectFailure( m_selector, e ) ;                    continue ;                }                                processInput() ;            }        }