public static void checkMechanism ( Oid mech ) throws GSSException { if ( mech != null && ! mech . equals ( GSSConstants . MECH_OID ) ) { throw new GSSException ( GSSException . BAD_MECH ) ; } }
Checks if the specified mechanism matches the mechanism supported by this implementation .