@Override
    public void messageReceived( S source, Message m )
    {
        boolean delivered = false;
        boolean trace = log.isLoggable(Level.FINER);
        
        for( MessageListener<? super S> l : listeners ) {
            if( trace ) {
                log.log(Level.FINER, "Delivering {0} to:{1}", new Object[]{m, l});
            }
            l.messageReceived( source, m );
            delivered = true;
        }
        
        for( MessageListener<? super S> l : getListeners(m.getClass(),false) ) {
            if( trace ) {
                log.log(Level.FINER, "Delivering {0} to:{1}", new Object[]{m, l});
            }
            l.messageReceived( source, m );
            delivered = true;
        }
        
        if( !delivered ) {
            log.log( Level.FINE, "Received message had no registered listeners: {0}", m );
        }
    }
Keeps track of message listeners registered to specific
 types or to any type.

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