javax.naming.Context.composeName()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(123)

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

Context.composeName介绍

暂无

代码示例

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

@Override
public Name composeName(Name name, Name prefix) throws NamingException {
  return context.composeName(name, prefix);
}

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

@Override
public String composeName(String name, String prefix) throws NamingException {
  return context.composeName(name, prefix);
}

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

@Override
public Name composeName(final Name name, final Name prefix) throws NamingException {
  return CNCtxFactory.INSTANCE.getInitialContext(environment).composeName(name, prefix);
}

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

@Override
public String composeName(final String name, final String prefix) throws NamingException {
  return CNCtxFactory.INSTANCE.getInitialContext(environment).composeName(name, prefix);
}

代码示例来源:origin: apache/geode

sub.composeName("name", "prefix");
 fail();
} catch (NoPermissionException expected) {
 sub.composeName(parser.parse("a"), parser.parse("b"));
 fail();
} catch (NoPermissionException expected) {

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

/**
 * Implementation of {@code fixName} method. If the context is {@code null}, then the
 * {@linkplain #getInitialContext GeoTools initial context} will be fetch only when first
 * needed.
 */
private static String fixName(Context context, final String name, final Hints hints) {
  String fixed = null;
  if (name != null) {
    final StringTokenizer tokens = new StringTokenizer(name, ":/");
    while (tokens.hasMoreTokens()) {
      final String part = tokens.nextToken();
      if (fixed == null) {
        fixed = part;
      } else
        try {
          if (context == null) {
            context = getInitialContext(hints);
          }
          fixed = context.composeName(fixed, part);
        } catch (NamingException e) {
          Logging.unexpectedException(GeoTools.class, "fixName", e);
          return name;
        }
    }
  }
  return fixed;
}

代码示例来源:origin: org.ow2.carol/carol

/**
 * Composes the name of this context with a name relative to this context.
 * @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 <code>prefix</code> and <code>name</code>
 * @throws NamingException if a naming exception is encountered
 */
public Name composeName(Name name, Name prefix) throws NamingException {
  return currentInitialContext.composeName(name, prefix);
}

代码示例来源:origin: org.jboss/jboss-common-core

public Name composeName(Name name, Name prefix)
 throws NamingException
{
 return delegate.composeName(name, prefix);
}

代码示例来源:origin: apache/james-project

@Override
  public Object operation() throws NamingException {
    return getDelegate().composeName(name, prefix);
  }
}.perform();

代码示例来源:origin: apache/james-project

@Override
  public Object operation() throws NamingException {
    return getDelegate().composeName(name, prefix);
  }
}.perform();

代码示例来源:origin: org.apache.james/james-server-util

@Override
  public Object operation() throws NamingException {
    return getDelegate().composeName(name, prefix);
  }
}.perform();

代码示例来源:origin: org.ow2.petals/petals-kernel

@Override
public String composeName(String name, String prefix)
  throws NamingException {
  String out;
  if (this.initialContext == null) {
    out = this.defaultInitCtx.composeName(name, prefix);
  } else {
    out = this.initialContext.composeName(name, prefix);
  }
  return out;
}

代码示例来源:origin: org.apache.tomee/tomee-catalina

/**
 * {@inheritDoc}
 */
public Name composeName(final Name name, final Name prefix) throws NamingException {
  return getThreadContext().composeName(name, prefix);
}

代码示例来源:origin: org.ow2.carol.cmi/cmi-jndi

public String composeName(final String name, final String prefix) throws NamingException {
  if(serverModeEnabled) {
    return localContext.composeName(name, prefix);
  } else {
    LOGGER.warn("Cannot compose name because server mode is not activated.");
    return null;
  }
}

代码示例来源:origin: org.apache.xbean/xbean-naming

@Override
protected String getName(String name) throws NamingException {
  Name parsedName = context.getNameParser("").parse(name);
  return context.composeName(nameInContext, parsedName).toString();
}

代码示例来源:origin: org.springframework.ldap/spring-ldap-core

/**
 * @see javax.naming.Context#composeName(javax.naming.Name, javax.naming.Name)
 */
public Name composeName(Name name, Name prefix) throws NamingException {
  this.assertOpen();
  return this.getDelegateContext().composeName(name, prefix);
}

代码示例来源:origin: org.springframework.ldap/spring-ldap-core

/**
 * @see javax.naming.Context#composeName(java.lang.String, java.lang.String)
 */
public String composeName(String name, String prefix) throws NamingException {
  this.assertOpen();
  return this.getDelegateContext().composeName(name, prefix);
}

代码示例来源:origin: spring-projects/spring-ldap

/**
 * @see javax.naming.Context#composeName(javax.naming.Name, javax.naming.Name)
 */
public Name composeName(Name name, Name prefix) throws NamingException {
  this.assertOpen();
  return this.getDelegateContext().composeName(name, prefix);
}

代码示例来源:origin: spring-projects/spring-ldap

/**
 * @see Context#composeName(String, String)
 */
public String composeName(String name, String prefix) throws NamingException {
  this.assertOpen();
  return this.getDelegateContext().composeName(name, prefix);
}

代码示例来源:origin: org.apache.xbean/xbean-naming

public String getNameInNamespace() throws NamingException {
    Name parsedNameInNamespace = context.getNameParser("").parse(context.getNameInNamespace());
    return context.composeName(parsedNameInNamespace, nameInContext).toString();
  }
}

相关文章