javax.naming.Binding.getNameInNamespace()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(112)

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

Binding.getNameInNamespace介绍

暂无

代码示例

代码示例来源:origin: org.picketlink/picketlink-idm-impl

public void destroyRecursively(String dn) {
  NamingEnumeration<Binding> enumeration = null;
  
  try {
    enumeration = this.context.listBindings(dn);
    
    while (enumeration.hasMore()) {
      Binding binding = enumeration.next();
      String name = binding.getNameInNamespace();
      
      destroyRecursively(name);
    }
    this.context.unbind(dn);
  } catch (NamingException e) {
    throw new RuntimeException(e);
  } finally {
    try {
      enumeration.close();
    } catch (Exception e) {
    }
  }        
}

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

/**
 * <p>
 * Destroys a subcontext with the given DN from the LDAP tree.
 * </p>
 *
 * @param dn
 */
private void destroySubcontext(LdapContext context, final String dn) {
  try {
    NamingEnumeration<Binding> enumeration = null;
    try {
      enumeration = context.listBindings(dn);
      while (enumeration.hasMore()) {
        Binding binding = enumeration.next();
        String name = binding.getNameInNamespace();
        destroySubcontext(context, name);
      }
      context.unbind(dn);
    } finally {
      try {
        enumeration.close();
      } catch (Exception e) {
      }
    }
  } catch (Exception e) {
    LDAP_STORE_LOGGER.errorf(e, "Could not unbind DN [%s]", dn);
    throw new RuntimeException(e);
  }
}

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

/**
 * <p>
 * Destroys a subcontext with the given DN from the LDAP tree.
 * </p>
 *
 * @param dn
 */
private void destroySubcontext(LdapContext context, final String dn) {
  try {
    NamingEnumeration<Binding> enumeration = null;
    try {
      enumeration = context.listBindings(dn);
      while (enumeration.hasMore()) {
        Binding binding = enumeration.next();
        String name = binding.getNameInNamespace();
        destroySubcontext(context, name);
      }
      context.unbind(dn);
    } finally {
      try {
        enumeration.close();
      } catch (Exception e) {
      }
    }
  } catch (Exception e) {
    LDAP_STORE_LOGGER.errorf(e, "Could not unbind DN [%s]", dn);
    throw new RuntimeException(e);
  }
}

相关文章