Examples of composeName()


Examples of javax.naming.Context.composeName()

    try {
      String prefix = parameters[1].toString();
      Any param1 = parameters[0];
      Any param2 = parameters[1];
      if (param1 instanceof AnyName && param2 instanceof AnyName) {
        return new AnyName(ctx.composeName(
          (Name)param1.toObject(), (Name)param2.toObject()));
      } else {
        return Any.create(ctx.composeName(param1.toString(), param2.toString()));
      }
    } catch (NamingException e) {
View Full Code Here

Examples of javax.naming.Context.composeName()

      Any param2 = parameters[1];
      if (param1 instanceof AnyName && param2 instanceof AnyName) {
        return new AnyName(ctx.composeName(
          (Name)param1.toObject(), (Name)param2.toObject()));
      } else {
        return Any.create(ctx.composeName(param1.toString(), param2.toString()));
      }
    } catch (NamingException e) {
      throw context.exception(e);
    }
  }
View Full Code Here

Examples of javax.naming.Context.composeName()

  /**  
   * Composes the name of this context with a name relative to this context.
   */
   public Name composeName(Name name, Name prefix) throws NamingException {
    Context ctx = getImpl();
    return ctx.composeName(name, prefix);
   }


  /**  
   * Composes the name of this context with a name relative to this context.
View Full Code Here

Examples of javax.naming.Context.composeName()

  /**  
   * Composes the name of this context with a name relative to this context.
   */
  public String composeName(String name, String prefix) throws NamingException {
    Context ctx = getImpl();
    return ctx.composeName(name, prefix);
  }

  /**  
         * Creates and binds a new context.
         */  
View Full Code Here

Examples of javax.naming.Context.composeName()

        env.put(Context.PROVIDER_URL, propStr1);
        ctx = new DNSContextFactory().getInitialContext(env);
        // #composeName(Name, Name)
        // NULL & NULL
        try {
            ctx.composeName(name, prefix);
            fail("NullPointerException has not been thrown");
        } catch (NullPointerException e) {}
        // CompositeName & CompositeName
        name = new CompositeName("host1/file1.html");
        prefix = new CompositeName("/example.com");
View Full Code Here

Examples of javax.naming.Context.composeName()

            fail("NullPointerException has not been thrown");
        } catch (NullPointerException e) {}
        // CompositeName & CompositeName
        name = new CompositeName("host1/file1.html");
        prefix = new CompositeName("/example.com");
        result = ctx.composeName(name, prefix);
        assertEquals("/host1.example.com/file1.html", result.toString());
        // DNSName & CompositeName
        name = nameParser.parse("host1.mysubdomain");
        prefix = new CompositeName("schema2:/example.com");
        result = ctx.composeName(name, prefix);
View Full Code Here

Examples of javax.naming.Context.composeName()

        result = ctx.composeName(name, prefix);
        assertEquals("/host1.example.com/file1.html", result.toString());
        // DNSName & CompositeName
        name = nameParser.parse("host1.mysubdomain");
        prefix = new CompositeName("schema2:/example.com");
        result = ctx.composeName(name, prefix);
        assertEquals("schema2:/host1.mysubdomain.example.com",
                result.toString());
        // CompositeName & DNSName
        name = new CompositeName("host1/file1.html");
        prefix = nameParser.parse("subdomain.example.com.");
View Full Code Here

Examples of javax.naming.Context.composeName()

        assertEquals("schema2:/host1.mysubdomain.example.com",
                result.toString());
        // CompositeName & DNSName
        name = new CompositeName("host1/file1.html");
        prefix = nameParser.parse("subdomain.example.com.");
        result = ctx.composeName(name, prefix);   
        assertEquals("host1.subdomain.example.com./file1.html",
                result.toString());
        // DNSName & DNSName
        name = nameParser.parse("host1.subdomain1");
        prefix = nameParser.parse("subdomain2.example.com.");
View Full Code Here

Examples of javax.naming.Context.composeName()

        assertEquals("host1.subdomain.example.com./file1.html",
                result.toString());
        // DNSName & DNSName
        name = nameParser.parse("host1.subdomain1");
        prefix = nameParser.parse("subdomain2.example.com.");
        result = ctx.composeName(name, prefix);   
        assertEquals("host1.subdomain1.subdomain2.example.com.",
                result.toString());

        // error
        name = ProviderConstants.ROOT_ZONE_NAME_OBJ;
View Full Code Here

Examples of javax.naming.Context.composeName()

        // error
        name = ProviderConstants.ROOT_ZONE_NAME_OBJ;
        prefix = new CompositeName("schema33:/domain.com");
        try {
            result = ctx.composeName(name, prefix);
            fail("NamingException should be thrown");
        } catch (NamingException e) {}

        // string form
        resultStr = ctx.composeName("host1/file1.html", "/example.com");
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.