Package javax.naming

Examples of javax.naming.Name.addAll()


     */
    @Override
    public Name composeName(Name name, Name prefix)
        throws NamingException {
        Name prefixClone = (Name) prefix.clone();
        return prefixClone.addAll(name);
    }


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


            NameParser parser = context.getNameParser("");
            Name contextName = parser.parse(context.getNameInNamespace());
            Name baseName = parser.parse(userBase);
            Name entryName = parser.parse(result.getName());
            Name name = contextName.addAll(baseName);
            name = name.addAll(entryName);
            String dn = name.toString();

            Attributes attrs = result.getAttributes();
            if (attrs == null) {
                return false;
View Full Code Here

     */
    @Override
    public Name composeName(Name name, Name prefix)
        throws NamingException {
        Name prefixClone = (Name) prefix.clone();
        return prefixClone.addAll(name);
    }


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

     */
    @Override
    public Name composeName(Name name, Name prefix)
        throws NamingException {
        Name clone = (Name) prefix.clone();
        return clone.addAll(name);
    }


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

        Name[] childRdns = new Name[children.length];
       
        for ( int i = 0; ( i < children.length ) && ( count[0] < sizeLimit ); i++ )
        {
            Name childRdn = new DN();
            childRdn.addAll( parent );
            childRdn.add( "ou=" + i );
            childRdns[i] = childRdn;
            getSystemContext( service ).createSubcontext( childRdn, children[i] );
            count[0]++;
        }
View Full Code Here

        catch (NameNotFoundException e)
        {
            //expected
        }
        Name name = parser.parse("a");
        name.addAll(parser.parse("b/c/d"));
        NamingUtil.bind(ic, name.toString(), "333");
        assertNotNull(ic.lookup("a"));
        assertNotNull(ic.lookup("a/b"));
        assertNotNull(ic.lookup("a/b/c"));
        Context c = (Context)ic.lookup("a/b/c");
View Full Code Here

        assertTrue (session.getDebug());
       
        Context foo = icontext.createSubcontext("foo");
        NameParser parser = icontext.getNameParser("");
        Name objectNameInNamespace = parser.parse(icontext.getNameInNamespace());
        objectNameInNamespace.addAll(parser.parse("mail/Session"));
       
        NamingUtil.bind(foo, "mail/Session", new LinkRef(objectNameInNamespace.toString()));
       
        Object o = foo.lookup("mail/Session");
        assertNotNull(o);
View Full Code Here

            parser = ic.getNameParser("");
        }
       
        Name name = parser.parse("");
        name.add(NamingEntry.__contextName);
        name.addAll(parser.parse(jndiName));
        return name;
    }
   

    public static Name getNameForScope (Object scope)
View Full Code Here

        NameParser parser = ic.getNameParser("");
        Name prefix = NamingEntryUtil.getNameForScope(scope);
     
        //bind the NamingEntry into the context
        Name namingEntryName = NamingEntryUtil.makeNamingEntryName(parser, getJndiName());
        namingEntryName.addAll(0, prefix);
        namingEntryNameString = namingEntryName.toString();
        NamingUtil.bind(ic, namingEntryNameString, this);
               
        //bind the object as well
        Name objectName = parser.parse(getJndiName());
View Full Code Here

        namingEntryNameString = namingEntryName.toString();
        NamingUtil.bind(ic, namingEntryNameString, this);
               
        //bind the object as well
        Name objectName = parser.parse(getJndiName());
        objectName.addAll(0, prefix);
        objectNameString = objectName.toString();
        NamingUtil.bind(ic, objectNameString, objectToBind);
    }
   
}
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.