@Override
    public void close() 
    {
        if( !isRunning )
            throw new IllegalStateException( "Server is not started." );
 
        // First stop the services since we are about to
        // kill the connections they are using
        services.stop();
 
        try {
            // Kill the adapters, they will kill the kernels
            for( KernelAdapter ka : channels ) {
                ka.close();
            }
            
            isRunning = false;
            
            // Now terminate all of the services.
            services.terminate();             
        } catch( InterruptedException e ) {
            throw new RuntimeException( "Interrupted while closing", e );
        }                               
    }
A default implementation of the Server interface that delegates
 its network connectivity to kernel.Kernel.

 @version   $Revision$
 @author    Paul Speed
jme3-networking/src/main/java/com/jme3/network/base/DefaultServer.java