当前位置: 首页>>代码示例>>Java>>正文


Java Name.addAll方法代码示例

本文整理汇总了Java中javax.naming.Name.addAll方法的典型用法代码示例。如果您正苦于以下问题:Java Name.addAll方法的具体用法?Java Name.addAll怎么用?Java Name.addAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.naming.Name的用法示例。


在下文中一共展示了Name.addAll方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDistinguishedName

import javax.naming.Name; //导入方法依赖的package包/类
/**
 * Returns the distinguished name of a search result.
 *
 * @param context Our DirContext
 * @param base The base DN
 * @param result The search result
 * @return String containing the distinguished name
 */
protected String getDistinguishedName(DirContext context, String base, SearchResult result)
    throws NamingException {
    // Get the entry's distinguished name
    NameParser parser = context.getNameParser("");
    Name contextName = parser.parse(context.getNameInNamespace());
    Name baseName = parser.parse(base);

    // Bugzilla 32269
    Name entryName = parser.parse(new CompositeName(result.getName()).get(0));

    Name name = contextName.addAll(baseName);
    name = name.addAll(entryName);
    return name.toString();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:23,代码来源:JNDIRealm.java

示例2: composeName

import javax.naming.Name; //导入方法依赖的package包/类
/**
 * Returns composition of prefix and name .
 * 
 * @param name name relative to this context
 * @param prefix name of this context Example: composeName("a","b") : b/a composeName("a","") : a
 * 
 */
public Name composeName(Name name, Name prefix) throws NamingException {
  checkIsDestroyed();
  // We do not want to modify any of the parameters (JNDI requirement).
  // Clone <code> prefix </code> to satisfy the requirement.
  Name parsedPrefix = getParsedName((Name) prefix.clone());
  Name parsedName = getParsedName(name);
  return parsedPrefix.addAll(parsedName);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:16,代码来源:ContextImpl.java

示例3: composeName

import javax.naming.Name; //导入方法依赖的package包/类
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix)
 * of this context relative to one of its ancestors, this method returns
 * the composition of the two names using the syntax appropriate for the
 * naming system(s) involved. That is, if name names an object relative
 * to this context, the result is the name of the same object, but
 * relative to the ancestor context. None of the names may be null.
 *
 * @param name a name relative to this context
 * @param prefix the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix)
    throws NamingException {
    Name prefixClone = (Name) prefix.clone();
    return prefixClone.addAll(name);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:22,代码来源:SelectorContext.java

示例4: composeName

import javax.naming.Name; //导入方法依赖的package包/类
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix) 
 * of this context relative to one of its ancestors, this method returns 
 * the composition of the two names using the syntax appropriate for the 
 * naming system(s) involved. That is, if name names an object relative 
 * to this context, the result is the name of the same object, but 
 * relative to the ancestor context. None of the names may be null.
 * 
 * @param name a name relative to this context
 * @param prefix the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix)
    throws NamingException {
    Name clone = (Name) prefix.clone();
    return clone.addAll(name);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:22,代码来源:BaseDirContext.java

示例5: composeName

import javax.naming.Name; //导入方法依赖的package包/类
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix) 
 * of this context relative to one of its ancestors, this method returns 
 * the composition of the two names using the syntax appropriate for the 
 * naming system(s) involved. That is, if name names an object relative 
 * to this context, the result is the name of the same object, but 
 * relative to the ancestor context. None of the names may be null.
 * 
 * @param name a name relative to this context
 * @param prefix the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix)
    throws NamingException {
    Name prefixClone = (Name) prefix.clone();
    return prefixClone.addAll(name);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:22,代码来源:ProxyDirContext.java

示例6: composeName

import javax.naming.Name; //导入方法依赖的package包/类
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix) of
 * this context relative to one of its ancestors, this method returns the
 * composition of the two names using the syntax appropriate for the naming
 * system(s) involved. That is, if name names an object relative to this
 * context, the result is the name of the same object, but relative to the
 * ancestor context. None of the names may be null.
 *
 * @param name
 *            a name relative to this context
 * @param prefix
 *            the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException
 *                if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
	Name prefixClone = (Name) prefix.clone();
	return prefixClone.addAll(name);
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:24,代码来源:SelectorContext.java

示例7: composeName

import javax.naming.Name; //导入方法依赖的package包/类
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix) of
 * this context relative to one of its ancestors, this method returns the
 * composition of the two names using the syntax appropriate for the naming
 * system(s) involved. That is, if name names an object relative to this
 * context, the result is the name of the same object, but relative to the
 * ancestor context. None of the names may be null.
 * 
 * @param name
 *            a name relative to this context
 * @param prefix
 *            the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException
 *                if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
	Name clone = (Name) prefix.clone();
	return clone.addAll(name);
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:24,代码来源:BaseDirContext.java

示例8: composeName

import javax.naming.Name; //导入方法依赖的package包/类
/**
 * Composes the name of this context with a name relative to this context.
 * <p>
 * Given a name (name) relative to this context, and the name (prefix) of
 * this context relative to one of its ancestors, this method returns the
 * composition of the two names using the syntax appropriate for the naming
 * system(s) involved. That is, if name names an object relative to this
 * context, the result is the name of the same object, but relative to the
 * ancestor context. None of the names may be null.
 * 
 * @param name
 *            a name relative to this context
 * @param prefix
 *            the name of this context relative to one of its ancestors
 * @return the composition of prefix and name
 * @exception NamingException
 *                if a naming exception is encountered
 */
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
	Name prefixClone = (Name) prefix.clone();
	return prefixClone.addAll(name);
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:24,代码来源:ProxyDirContext.java


注:本文中的javax.naming.Name.addAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。