java.security.Provider.setProviderNumber()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中java.security.Provider.setProviderNumber()方法的一些代码示例,展示了Provider.setProviderNumber()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Provider.setProviderNumber()方法的具体详情如下:
包路径:java.security.Provider
类名称:Provider
方法名:setProviderNumber

Provider.setProviderNumber介绍

[英]Set the provider preference order number.
[中]设置提供商首选项订单号。

代码示例

代码示例来源:origin: robovm/robovm

/**
 *
 * Update sequence numbers of all providers.
 *
 */
private static void renumProviders() {
  Provider[] p = Services.getProviders();
  for (int i = 0; i < p.length; i++) {
    p[i].setProviderNumber(i + 1);
  }
}

代码示例来源:origin: robovm/robovm

/**
 * Removes the {@code Provider} with the specified name form the collection
 * of providers. If the the {@code Provider} with the specified name is
 * removed, all provider at a greater position are shifted down one
 * position.
 *
 * <p>Returns silently if {@code name} is {@code null} or no provider with the
 * specified name is installed.
 *
 * @param name
 *            the name of the provider to remove.
 */
public static synchronized void removeProvider(String name) {
  // It is not clear from spec.:
  // 1. if name is null, should we checkSecurityAccess or not?
  //    throw SecurityException or not?
  // 2. as 1 but provider is not installed
  // 3. behavior if name is empty string?
  Provider p;
  if ((name == null) || (name.length() == 0)) {
    return;
  }
  p = getProvider(name);
  if (p == null) {
    return;
  }
  Services.removeProvider(p.getProviderNumber());
  renumProviders();
  p.setProviderNumber(-1);
}

代码示例来源:origin: MobiVM/robovm

/**
 *
 * Update sequence numbers of all providers.
 *
 */
private static void renumProviders() {
  Provider[] p = Services.getProviders();
  for (int i = 0; i < p.length; i++) {
    p[i].setProviderNumber(i + 1);
  }
}

代码示例来源:origin: ibinti/bugvm

/**
 *
 * Update sequence numbers of all providers.
 *
 */
private static void renumProviders() {
  Provider[] p = Services.getProviders();
  for (int i = 0; i < p.length; i++) {
    p[i].setProviderNumber(i + 1);
  }
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 *
 * Update sequence numbers of all providers.
 *
 */
private static void renumProviders() {
  Provider[] p = Services.getProviders();
  for (int i = 0; i < p.length; i++) {
    p[i].setProviderNumber(i + 1);
  }
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 *
 * Update sequence numbers of all providers.
 *
 */
private static void renumProviders() {
  Provider[] p = Services.getProviders();
  for (int i = 0; i < p.length; i++) {
    p[i].setProviderNumber(i + 1);
  }
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 *
 * Update sequence numbers of all providers.
 *
 */
private static void renumProviders() {
  Provider[] p = Services.getProviders();
  for (int i = 0; i < p.length; i++) {
    p[i].setProviderNumber(i + 1);
  }
}

代码示例来源:origin: FlexoVM/flexovm

/**
 *
 * Update sequence numbers of all providers.
 *
 */
private static void renumProviders() {
  Provider[] p = Services.getProviders();
  for (int i = 0; i < p.length; i++) {
    p[i].setProviderNumber(i + 1);
  }
}

代码示例来源:origin: MobiVM/robovm

/**
 * Removes the {@code Provider} with the specified name form the collection
 * of providers. If the the {@code Provider} with the specified name is
 * removed, all provider at a greater position are shifted down one
 * position.
 *
 * <p>Returns silently if {@code name} is {@code null} or no provider with the
 * specified name is installed.
 *
 * @param name
 *            the name of the provider to remove.
 */
public static synchronized void removeProvider(String name) {
  // It is not clear from spec.:
  // 1. if name is null, should we checkSecurityAccess or not?
  //    throw SecurityException or not?
  // 2. as 1 but provider is not installed
  // 3. behavior if name is empty string?
  Provider p;
  if ((name == null) || (name.length() == 0)) {
    return;
  }
  p = getProvider(name);
  if (p == null) {
    return;
  }
  Services.removeProvider(p.getProviderNumber());
  renumProviders();
  p.setProviderNumber(-1);
}

代码示例来源:origin: ibinti/bugvm

/**
 * Removes the {@code Provider} with the specified name form the collection
 * of providers. If the the {@code Provider} with the specified name is
 * removed, all provider at a greater position are shifted down one
 * position.
 *
 * <p>Returns silently if {@code name} is {@code null} or no provider with the
 * specified name is installed.
 *
 * @param name
 *            the name of the provider to remove.
 */
public static synchronized void removeProvider(String name) {
  // It is not clear from spec.:
  // 1. if name is null, should we checkSecurityAccess or not?
  //    throw SecurityException or not?
  // 2. as 1 but provider is not installed
  // 3. behavior if name is empty string?
  Provider p;
  if ((name == null) || (name.length() == 0)) {
    return;
  }
  p = getProvider(name);
  if (p == null) {
    return;
  }
  Services.removeProvider(p.getProviderNumber());
  renumProviders();
  p.setProviderNumber(-1);
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Removes the {@code Provider} with the specified name form the collection
 * of providers. If the the {@code Provider} with the specified name is
 * removed, all provider at a greater position are shifted down one
 * position.
 *
 * <p>Returns silently if {@code name} is {@code null} or no provider with the
 * specified name is installed.
 *
 * @param name
 *            the name of the provider to remove.
 */
public static synchronized void removeProvider(String name) {
  // It is not clear from spec.:
  // 1. if name is null, should we checkSecurityAccess or not?
  //    throw SecurityException or not?
  // 2. as 1 but provider is not installed
  // 3. behavior if name is empty string?
  Provider p;
  if ((name == null) || (name.length() == 0)) {
    return;
  }
  p = getProvider(name);
  if (p == null) {
    return;
  }
  Services.removeProvider(p.getProviderNumber());
  renumProviders();
  p.setProviderNumber(-1);
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Removes the {@code Provider} with the specified name form the collection
 * of providers. If the the {@code Provider} with the specified name is
 * removed, all provider at a greater position are shifted down one
 * position.
 *
 * <p>Returns silently if {@code name} is {@code null} or no provider with the
 * specified name is installed.
 *
 * @param name
 *            the name of the provider to remove.
 */
public static synchronized void removeProvider(String name) {
  // It is not clear from spec.:
  // 1. if name is null, should we checkSecurityAccess or not?
  //    throw SecurityException or not?
  // 2. as 1 but provider is not installed
  // 3. behavior if name is empty string?
  Provider p;
  if ((name == null) || (name.length() == 0)) {
    return;
  }
  p = getProvider(name);
  if (p == null) {
    return;
  }
  Services.removeProvider(p.getProviderNumber());
  renumProviders();
  p.setProviderNumber(-1);
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Removes the {@code Provider} with the specified name form the collection
 * of providers. If the the {@code Provider} with the specified name is
 * removed, all provider at a greater position are shifted down one
 * position.
 *
 * <p>Returns silently if {@code name} is {@code null} or no provider with the
 * specified name is installed.
 *
 * @param name
 *            the name of the provider to remove.
 */
public static synchronized void removeProvider(String name) {
  // It is not clear from spec.:
  // 1. if name is null, should we checkSecurityAccess or not?
  //    throw SecurityException or not?
  // 2. as 1 but provider is not installed
  // 3. behavior if name is empty string?
  Provider p;
  if ((name == null) || (name.length() == 0)) {
    return;
  }
  p = getProvider(name);
  if (p == null) {
    return;
  }
  Services.removeProvider(p.getProviderNumber());
  renumProviders();
  p.setProviderNumber(-1);
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Removes the {@code Provider} with the specified name form the collection
 * of providers. If the the {@code Provider} with the specified name is
 * removed, all provider at a greater position are shifted down one
 * position.
 *
 * <p>Returns silently if {@code name} is {@code null} or no provider with the
 * specified name is installed.
 *
 * @param name
 *            the name of the provider to remove.
 */
public static synchronized void removeProvider(String name) {
  // It is not clear from spec.:
  // 1. if name is null, should we checkSecurityAccess or not?
  //    throw SecurityException or not?
  // 2. as 1 but provider is not installed
  // 3. behavior if name is empty string?
  Provider p;
  if ((name == null) || (name.length() == 0)) {
    return;
  }
  p = getProvider(name);
  if (p == null) {
    return;
  }
  Services.removeProvider(p.getProviderNumber());
  renumProviders();
  p.setProviderNumber(-1);
}

相关文章