本文整理了Java中javax.naming.Binding.getNameInNamespace()
方法的一些代码示例,展示了Binding.getNameInNamespace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.getNameInNamespace()
方法的具体详情如下:
包路径:javax.naming.Binding
类名称: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!