public boolean isMethodSupported ( String methodName , Class < ? > ... parameterTypes ) throws IOException { if ( serverMethods == null ) { // client & server have the same protocol return true ; } Method method ; try { method = protocol . getDeclaredMethod ( methodName , parameterTypes ) ; } catch ( SecurityException e ) { throw new IOException ( e ) ; } catch ( NoSuchMethodException e ) { throw new IOException ( e ) ; } return serverMethods . contains ( Integer . valueOf ( ProtocolSignature . getFingerprint ( method ) ) ) ; }
Check if a method is supported by the server or not