protected boolean isValidMethod( Method m, Class messageType ) {
 
        if( log.isLoggable(Level.FINEST) ) {
            log.log(Level.FINEST, "isValidMethod({0}, {1})", new Object[]{m, messageType});
        }
               
        // Parameters must be S and message type or just message type
        Class<?>[] parms = m.getParameterTypes();
        if( parms.length != 2 && parms.length != 1 ) {
            log.finest("Parameter count is not 1 or 2");
            return false;
        }                   
        int messageIndex = 0;
        if( parms.length > 1 ) {
            if( MessageConnection.class.isAssignableFrom(parms[0]) ) {
                messageIndex++;
            } else {
                log.finest("First parameter is not a MessageConnection or subclass.");
                return false;
            }
        }
 
        if( messageType == null && !Message.class.isAssignableFrom(parms[messageIndex]) ) {
            log.finest("Second parameter is not a Message or subclass.");
            return false;
        }
        if( messageType != null && !parms[messageIndex].isAssignableFrom(messageType) ) {
            log.log(Level.FINEST, "Second parameter is not a {0}", messageType);
            return false;
        }
        return true;            
    }
Returns true if the specified method is valid for the specified
 message type.  This is used internally during automapping to
 provide implementation specific filtering of methods.
 This implementation checks for methods that take either the connection and message 
 type arguments (in that order) or just the message type.
jme3-networking/src/main/java/com/jme3/network/util/AbstractMessageDelegator.java