Examples of CompositeName


Examples of javax.naming.CompositeName

      Trace.logger.log(
        BasicLevel.DEBUG,
        "HANamingContextFactory.getInitialContext(" + env + ')');
    return new fr.dyade.aaa.jndi2.client.NamingContextImpl(
      getNamingConnection(env),
      new CompositeName());   
  }
View Full Code Here

Examples of javax.naming.CompositeName

    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG,
                       "NamingContextFactory.getInitialContext(" + env + ')');

    return new NamingContextImpl(getNamingConnection(env),
                                 new CompositeName());   
  }
View Full Code Here

Examples of javax.naming.CompositeName

  }

  /** Empty constructor, called by the subclass. */
  protected NamingContextImpl()
  {
    contextPath = new CompositeName();
  }
View Full Code Here

Examples of javax.naming.CompositeName

  public Object lookup(String name) throws NamingException {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG, "NamingContextImpl.lookup(" +
                       name + ')');
    CompositeName path = merge(contextPath, name);
    JndiReply reply = connection.invoke(new LookupRequest(path));
    if (reply instanceof JndiError) {
      NamingException exc = ((JndiError)reply).getException();
      exc.fillInStackTrace();
      throw exc;
View Full Code Here

Examples of javax.naming.CompositeName

  public NamingEnumeration listBindings(String name) throws NamingException {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG, "NamingContextImpl.listBindings(" + name + ')');
   
    CompositeName queryPath = merge(contextPath, name);
    JndiReply reply = connection.invoke(new ListBindingsRequest(queryPath));
    if (reply instanceof JndiError) {
      NamingException exc = ((JndiError)reply).getException();
      exc.fillInStackTrace();
      throw exc;
    }
   
    ListBindingsReply lbr = (ListBindingsReply)reply;

    // 1- resolve contexts
    Binding[] bindings = lbr.getContexts();
    for (int i = 0; i < bindings.length; i++) {
      CompositeName subCtxPath = (CompositeName)queryPath.clone();
      subCtxPath.add(bindings[i].getName());
      bindings[i].setObject(new NamingContextImpl(
        connection.cloneConnection(), subCtxPath));
    }

    // 2- resolve references
View Full Code Here

Examples of javax.naming.CompositeName

  public Context createSubcontext(String name) throws NamingException {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG, "NamingContextImpl.createSubcontext(" +
                       name + ')');
    CompositeName path = merge(contextPath, name);
    JndiReply reply = connection.invoke(
      new CreateSubcontextRequest(path));   
    if (reply instanceof JndiError) {
      NamingException exc = ((JndiError)reply).getException();
      exc.fillInStackTrace();
View Full Code Here

Examples of javax.naming.CompositeName

    throw(new NamingException("Not yet available"));
  }

  private static CompositeName merge(CompositeName path, String name) throws NamingException {   
    if (name == null) throw new InvalidNameException();
    CompositeName res = new CompositeName(name);
    trim(res);
    for (int i = path.size() - 1; i > -1 ; i--) {
      res.add(0, path.get(i));
    }
    return res;
  }
View Full Code Here

Examples of javax.naming.CompositeName

    if (!strOwnerId.equals(ownerId.toString()))
      sendTo(new ChangeOwnerRequest((CompositeName) contextName.clone(), strOwnerId));
  }

  public void createSubcontext(String ctxName) throws NamingException {
    CompositeName cn = (CompositeName) contextName.clone();
    if (contextName != null)
      cn.add(ctxName);
    else
      cn = getCompositeName(ctxName);
    sendTo(new CreateSubcontextRequest(cn));
  }
View Full Code Here

Examples of javax.naming.CompositeName

      return rec.toString();
    return null;
  }

  public void unbind(String name) throws NamingException {
    CompositeName cn = (CompositeName) contextName.clone();
    if (contextName != null)
      cn.add(name);
    else
      cn = getCompositeName(name);
    sendTo(new UnbindRequest(cn));
  }
View Full Code Here

Examples of javax.naming.CompositeName

    sendTo(new UnbindRequest(cn));
  }
 
  private CompositeName getCompositeName(String path) throws InvalidNameException {
    if (path.startsWith("/"))
      return new CompositeName(path.substring(1, path.length()));
    return new CompositeName(path);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.