public void shutdown ( ) { if ( workers == null ) { if ( LOGGER . isLoggable ( Level . INFO ) ) LOGGER . info ( name + " already been shutdown" ) ; return ; } if ( LOGGER . isLoggable ( Level . INFO ) ) LOGGER . info ( "Starting shutdown " + name ) ; for ( final Thread worker : workers ) { worker . interrupt ( ) ; try { worker . join ( ) ; } catch ( InterruptedException exception ) { Thread . currentThread ( ) . interrupt ( ) ; } } workers = null ; TcpServerHandler handler ; while ( ( handler = handlers . poll ( ) ) != null ) handler . destroy ( ) ; handlers = null ; if ( LOGGER . isLoggable ( Level . INFO ) ) LOGGER . info ( name + " was shutdown" ) ; }
Shutdown connector .