private void sendNoticeOfDisconnect( IoSession requestor )
private void sendNoticeOfDisconnect( List sessions, IoSession requestor )
    private void sendNoticeOfDisconnect( IoSession requestor )    {        IoAcceptor acceptor = serviceRegistry.getAcceptor( ldapService.getTransportType() );        List sessions = new ArrayList( acceptor.getManagedSessions( ldapService.getAddress() ) );        List writeFutures = new ArrayList();                // Send Notification of Disconnection messages to all connected clients.        if( sessions != null )        {            for( Iterator i = sessions.iterator(); i.hasNext(); )            {                IoSession session = session = ( IoSession ) i.next();                                // make sure we do not send the disconnect mesasge to the                 // client which sent the initiating GracefulShutdown request                if ( session.equals( requestor ) )                {                    continue;                }                try                {                    writeFutures.add( session.write( NoticeOfDisconnect.UNAVAILABLE ) );                }                catch( Exception e )                {                    log.warn( "Failed to sent NoD for client: " + session, e );                }            }        }        // And close the connections when the NoDs are sent.        Iterator sessionIt = sessions.iterator();        for( Iterator i = writeFutures.iterator(); i.hasNext(); )        {            WriteFuture future = ( WriteFuture ) i.next();            try            {                future.join( 1000 );                ( ( IoSession ) sessionIt.next() ).close();            }            catch( Exception e )            {                log.warn( "Failed to sent NoD.", e );            }        }    }