protected void connectionClosed( Endpoint p )
    {
        if( p.isConnected() ) {
            log.log( Level.FINE, "Connection closed:{0}.", p );
        } else {
            log.log( Level.FINE, "Connection closed:{0}.", p );
        }
        
        // Try to find the endpoint in all ways that it might
        // exist.  Note: by this point the raw network channel is 
        // closed already.
    
        // Also note: this method will be called multiple times per
        // HostedConnection if it has multiple endpoints.
 
        Connection removed;
        synchronized( this ) {             
            // Just in case the endpoint was still connecting
            removeConnecting(p);

            // And the regular management
            removed = (Connection)endpointConnections.remove(p);
            if( removed != null ) {
                connections.remove( removed.getId() );                
            }
            
            log.log( Level.FINE, "Connections size:{0}", connections.size() );
            log.log( Level.FINE, "Endpoint mappings size:{0}", endpointConnections.size() );
        }
        
        // Better not to fire events while we hold a lock
        // so always do this outside the synch block.
        // Note: checking removed.closed just to avoid spurious log messages
        //       since in general we are called back for every endpoint closing.
        if( removed != null && !removed.closed ) {
        
            log.log( Level.FINE, "Client closed:{0}.", removed );
            
            removed.closeConnection();
        }
    }
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