Java Code Examples for javax.naming.Name#addAll()

The following examples show how to use javax.naming.Name#addAll() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContextImpl.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example 2
Source File: ContextImpl.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example 3
Source File: right_LmiInitialContext_1.6.java    From gumtree-spoon-ast-diff with Apache License 2.0 5 votes vote down vote up
public Name composeName(Name name, Name prefix) throws NamingException {
    if (TraceCarol.isDebugJndiCarol()) {
        TraceCarol.debugJndiCarol("LmiInitialContext.composeName(" + name + "," + prefix + ")");
    }
    Name result = (Name) (prefix.clone());
    result.addAll(name);
    return result;
}
 
Example 4
Source File: left_LmiInitialContext_1.5.java    From gumtree-spoon-ast-diff with Apache License 2.0 5 votes vote down vote up
public Name composeName(Name name, Name prefix) throws NamingException {
    if (TraceCarol.isDebugJndiCarol()) {
        TraceCarol.debugJndiCarol("LmiInitialContext.composeName(" + name + "," + prefix + ")");
    }
    Name result = (Name) (prefix.clone());
    result.addAll(name);
    return result;
}
 
Example 5
Source File: TestContext.java    From activemq-artemis with Apache License 2.0 4 votes vote down vote up
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
   Name result = (Name) prefix.clone();
   result.addAll(name);
   return result;
}
 
Example 6
Source File: IvmContext.java    From tomee with Apache License 2.0 4 votes vote down vote up
public Name composeName(final Name name, final Name prefix) throws NamingException {
    final Name result = (Name) prefix.clone();
    result.addAll(name);
    return result;
}
 
Example 7
Source File: TContext.java    From oodt with Apache License 2.0 4 votes vote down vote up
public Name composeName(Name name, Name prefix) throws NamingException {
	Name result = (Name) prefix.clone();
	result.addAll(name);
	return result;
}
 
Example 8
Source File: RMIContext.java    From oodt with Apache License 2.0 4 votes vote down vote up
public Name composeName(Name name, Name prefix) throws NamingException {
	Name result = (Name) prefix.clone();
	result.addAll(name);
	return result;
}
 
Example 9
Source File: HTTPContext.java    From oodt with Apache License 2.0 4 votes vote down vote up
public Name composeName(Name name, Name prefix) throws NamingException {
	Name result = (Name) prefix.clone();
	result.addAll(name);
	return result;
}
 
Example 10
Source File: ObjectContext.java    From oodt with Apache License 2.0 4 votes vote down vote up
public Name composeName(Name name, Name prefix) throws NamingException {
	Name result = (Name) prefix.clone();
	result.addAll(name);
	return result;
}
 
Example 11
Source File: ReadOnlyContext.java    From qpid-jms with Apache License 2.0 4 votes vote down vote up
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
    Name result = (Name) prefix.clone();
    result.addAll(name);
    return result;
}
 
Example 12
Source File: ReadOnlyContext.java    From activemq-artemis with Apache License 2.0 4 votes vote down vote up
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
   Name result = (Name) prefix.clone();
   result.addAll(name);
   return result;
}
 
Example 13
Source File: SelectorContext.java    From Tomcat8-Source-Read with MIT License 3 votes vote down vote up
/**
 * 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
 * @throws 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);
}
 
Example 14
Source File: ProxyDirContext.java    From tomcatsrc with Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example 15
Source File: BaseDirContext.java    From tomcatsrc with Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example 16
Source File: SelectorContext.java    From tomcatsrc with Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example 17
Source File: ProxyDirContext.java    From Tomcat7.0.67 with Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example 18
Source File: BaseDirContext.java    From Tomcat7.0.67 with Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}
 
Example 19
Source File: SelectorContext.java    From Tomcat7.0.67 with Apache License 2.0 3 votes vote down vote up
/**
 * 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);
}