Example usage for javax.naming.directory DirContext list

List of usage examples for javax.naming.directory DirContext list

Introduction

In this page you can find the example usage for javax.naming.directory DirContext list.

Prototype

public NamingEnumeration<NameClassPair> list(Name name) throws NamingException;

Source Link

Document

Enumerates the names bound in the named context, along with the class names of objects bound to them.

Usage

From source file:org.springframework.ldap.core.LdapTemplate.java

public void list(final String base, NameClassPairCallbackHandler handler) {
    SearchExecutor searchExecutor = new SearchExecutor() {
        public NamingEnumeration executeSearch(DirContext ctx) throws javax.naming.NamingException {
            return ctx.list(base);
        }//from   ww  w .  jav  a2 s .  c o  m
    };

    search(searchExecutor, handler);
}

From source file:org.springframework.ldap.core.LdapTemplate.java

public void list(final Name base, NameClassPairCallbackHandler handler) {
    SearchExecutor searchExecutor = new SearchExecutor() {
        public NamingEnumeration executeSearch(DirContext ctx) throws javax.naming.NamingException {
            return ctx.list(base);
        }/*from  w w  w. j a  v  a  2 s  . c  o  m*/
    };

    search(searchExecutor, handler);
}