javax.naming.spi.DirectoryManager Java Examples

The following examples show how to use javax.naming.spi.DirectoryManager. 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: PartialCompositeDirContext.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public DirContext createSubcontext(Name name, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    DirContext answer;
    Name nm = name;

    try {
        answer = ctx.p_createSubcontext(nm, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_createSubcontext(nm, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.createSubcontext(e.getRemainingName(), attrs);
    }
    return answer;
}
 
Example #2
Source File: PartialCompositeDirContext.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public NamingEnumeration<SearchResult>
    search(Name name,
           String filter,
           SearchControls cons)
    throws NamingException
{

    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    NamingEnumeration<SearchResult> answer;
    Name nm = name;

    try {
        answer = ctx.p_search(nm, filter, cons, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_search(nm, filter, cons, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.search(e.getRemainingName(), filter, cons);
    }
    return answer;
}
 
Example #3
Source File: PartialCompositeDirContext.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void modifyAttributes(Name name, int mod_op, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.modifyAttributes(e.getRemainingName(), mod_op, attrs);
    }
}
 
Example #4
Source File: PartialCompositeDirContext.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void bind(Name name, Object obj, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_bind(nm, obj, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_bind(nm, obj, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.bind(e.getRemainingName(), obj, attrs);
    }
}
 
Example #5
Source File: PartialCompositeDirContext.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void modifyAttributes(Name name, ModificationItem[] mods)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_modifyAttributes(nm, mods, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_modifyAttributes(nm, mods, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.modifyAttributes(e.getRemainingName(), mods);
    }
}
 
Example #6
Source File: PartialCompositeDirContext.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void bind(Name name, Object obj, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_bind(nm, obj, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_bind(nm, obj, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.bind(e.getRemainingName(), obj, attrs);
    }
}
 
Example #7
Source File: PartialCompositeDirContext.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public Attributes getAttributes(Name name, String[] attrIds)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Attributes answer;
    Name nm = name;

    try {
        answer = ctx.p_getAttributes(nm, attrIds, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_getAttributes(nm, attrIds, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.getAttributes(e.getRemainingName(), attrIds);
    }
    return answer;
}
 
Example #8
Source File: PartialCompositeDirContext.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void rebind(Name name, Object obj, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_rebind(nm, obj, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_rebind(nm, obj, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.rebind(e.getRemainingName(), obj, attrs);
    }
}
 
Example #9
Source File: PartialCompositeDirContext.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
public DirContext getSchemaClassDefinition(Name name)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    DirContext answer;
    Name nm = name;

    try {
        answer = ctx.p_getSchemaClassDefinition(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_getSchemaClassDefinition(nm, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.getSchemaClassDefinition(e.getRemainingName());
    }
    return answer;
}
 
Example #10
Source File: PartialCompositeDirContext.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void bind(Name name, Object obj, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_bind(nm, obj, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_bind(nm, obj, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.bind(e.getRemainingName(), obj, attrs);
    }
}
 
Example #11
Source File: PartialCompositeDirContext.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void rebind(Name name, Object obj, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_rebind(nm, obj, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_rebind(nm, obj, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.rebind(e.getRemainingName(), obj, attrs);
    }
}
 
Example #12
Source File: PartialCompositeDirContext.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public DirContext createSubcontext(Name name, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    DirContext answer;
    Name nm = name;

    try {
        answer = ctx.p_createSubcontext(nm, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_createSubcontext(nm, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.createSubcontext(e.getRemainingName(), attrs);
    }
    return answer;
}
 
Example #13
Source File: PartialCompositeDirContext.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public NamingEnumeration<SearchResult>
    search(Name name,
           String filter,
           SearchControls cons)
    throws NamingException
{

    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    NamingEnumeration<SearchResult> answer;
    Name nm = name;

    try {
        answer = ctx.p_search(nm, filter, cons, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_search(nm, filter, cons, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.search(e.getRemainingName(), filter, cons);
    }
    return answer;
}
 
Example #14
Source File: PartialCompositeDirContext.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public NamingEnumeration<SearchResult>
    search(Name name,
           String filter,
           SearchControls cons)
    throws NamingException
{

    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    NamingEnumeration<SearchResult> answer;
    Name nm = name;

    try {
        answer = ctx.p_search(nm, filter, cons, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_search(nm, filter, cons, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.search(e.getRemainingName(), filter, cons);
    }
    return answer;
}
 
Example #15
Source File: PartialCompositeDirContext.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void modifyAttributes(Name name, ModificationItem[] mods)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_modifyAttributes(nm, mods, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_modifyAttributes(nm, mods, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.modifyAttributes(e.getRemainingName(), mods);
    }
}
 
Example #16
Source File: PartialCompositeDirContext.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void modifyAttributes(Name name, int mod_op, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.modifyAttributes(e.getRemainingName(), mod_op, attrs);
    }
}
 
Example #17
Source File: PartialCompositeDirContext.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public DirContext getSchemaClassDefinition(Name name)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    DirContext answer;
    Name nm = name;

    try {
        answer = ctx.p_getSchemaClassDefinition(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_getSchemaClassDefinition(nm, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.getSchemaClassDefinition(e.getRemainingName());
    }
    return answer;
}
 
Example #18
Source File: PartialCompositeDirContext.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void rebind(Name name, Object obj, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_rebind(nm, obj, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_rebind(nm, obj, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.rebind(e.getRemainingName(), obj, attrs);
    }
}
 
Example #19
Source File: PartialCompositeDirContext.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void modifyAttributes(Name name, ModificationItem[] mods)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_modifyAttributes(nm, mods, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_modifyAttributes(nm, mods, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.modifyAttributes(e.getRemainingName(), mods);
    }
}
 
Example #20
Source File: PartialCompositeDirContext.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public DirContext getSchema(Name name) throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    DirContext answer;
    Name nm = name;

    try {
        answer = ctx.p_getSchema(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_getSchema(nm, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.getSchema(e.getRemainingName());
    }
    return answer;
}
 
Example #21
Source File: PartialCompositeDirContext.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void modifyAttributes(Name name, int mod_op, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.modifyAttributes(e.getRemainingName(), mod_op, attrs);
    }
}
 
Example #22
Source File: PartialCompositeDirContext.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void modifyAttributes(Name name, ModificationItem[] mods)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_modifyAttributes(nm, mods, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_modifyAttributes(nm, mods, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.modifyAttributes(e.getRemainingName(), mods);
    }
}
 
Example #23
Source File: PartialCompositeDirContext.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void modifyAttributes(Name name, int mod_op, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.modifyAttributes(e.getRemainingName(), mod_op, attrs);
    }
}
 
Example #24
Source File: PartialCompositeDirContext.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void bind(Name name, Object obj, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_bind(nm, obj, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_bind(nm, obj, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.bind(e.getRemainingName(), obj, attrs);
    }
}
 
Example #25
Source File: PartialCompositeDirContext.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void modifyAttributes(Name name, int mod_op, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_modifyAttributes(nm, mod_op, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.modifyAttributes(e.getRemainingName(), mod_op, attrs);
    }
}
 
Example #26
Source File: PartialCompositeDirContext.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public Attributes getAttributes(Name name, String[] attrIds)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Attributes answer;
    Name nm = name;

    try {
        answer = ctx.p_getAttributes(nm, attrIds, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_getAttributes(nm, attrIds, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.getAttributes(e.getRemainingName(), attrIds);
    }
    return answer;
}
 
Example #27
Source File: PartialCompositeDirContext.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void rebind(Name name, Object obj, Attributes attrs)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Name nm = name;

    try {
        ctx.p_rebind(nm, obj, attrs, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            ctx.p_rebind(nm, obj, attrs, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        cctx.rebind(e.getRemainingName(), obj, attrs);
    }
}
 
Example #28
Source File: PartialCompositeDirContext.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public DirContext getSchema(Name name) throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    DirContext answer;
    Name nm = name;

    try {
        answer = ctx.p_getSchema(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_getSchema(nm, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.getSchema(e.getRemainingName());
    }
    return answer;
}
 
Example #29
Source File: PartialCompositeDirContext.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public DirContext getSchemaClassDefinition(Name name)
        throws NamingException {
    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    DirContext answer;
    Name nm = name;

    try {
        answer = ctx.p_getSchemaClassDefinition(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_getSchemaClassDefinition(nm, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.getSchemaClassDefinition(e.getRemainingName());
    }
    return answer;
}
 
Example #30
Source File: PartialCompositeDirContext.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public NamingEnumeration<SearchResult>
    search(Name name,
           String filter,
           SearchControls cons)
    throws NamingException
{

    PartialCompositeDirContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    NamingEnumeration<SearchResult> answer;
    Name nm = name;

    try {
        answer = ctx.p_search(nm, filter, cons, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCDirContext(cont);
            answer = ctx.p_search(nm, filter, cons, cont);
        }
    } catch (CannotProceedException e) {
        DirContext cctx = DirectoryManager.getContinuationDirContext(e);
        answer = cctx.search(e.getRemainingName(), filter, cons);
    }
    return answer;
}