private void sendGracefulDisconnect( GracefulDisconnect msg, IoSession requestor )
private void sendGracefulDisconnect( List sessions, GracefulDisconnect msg, IoSession requestor )
    private void sendGracefulDisconnect( GracefulDisconnect msg, IoSession requestor )    {        IoAcceptor acceptor = serviceRegistry.getAcceptor( ldapService.getTransportType() );        List sessions = new ArrayList( acceptor.getManagedSessions( ldapService.getAddress() ) );        List writeFutures = new ArrayList();                // asynchronously send GracefulDisconnection messages to all connected        // clients giving time for the message to arrive before we block         // waiting for message delivery to the client in the loop below                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( msg ) );                }                catch( Exception e )                {                    log.warn( "Failed to write GracefulDisconnect to client session: " + session, e );                }            }        }        // wait for GracefulDisconnect messages to be sent before returning        for( Iterator i = writeFutures.iterator(); i.hasNext(); )        {            WriteFuture future = ( WriteFuture ) i.next();            try            {                future.join( 1000 );            }            catch( Exception e )            {                log.warn( "Failed to sent GracefulDisconnect", e );            }        }    }