code: public static void checkMechanism(Oid mech)
  	throws GSSException {
  	if (mech != null && !mech.equals(GSSConstants.MECH_OID)) {
  	    throw new GSSException(GSSException.BAD_MECH);
  	}
      }
docs: Checks if the specified mechanism matches
  the mechanism supported by this implementation.
  
  @param mech mechanism to check
  @exception GSSException if mechanism not supported.