1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.ldaptemplate;
17
18 import javax.naming.NamingEnumeration;
19 import javax.naming.NamingException;
20 import javax.naming.directory.DirContext;
21
22 /***
23 * Interface for delegating an actual search operation. The typical
24 * implementation of executeSearch would be something like:
25 *
26 * <pre>
27 * return ctx.search(dn, filter, searchControls);
28 * </pre>
29 *
30 * @see net.sf.ldaptemplate.LdapTemplate#search(SearchExecutor,
31 * SearchResultCallbackHandler)
32 *
33 * @author Mattias Arthursson
34 */
35 public interface SearchExecutor {
36 /***
37 * Execute the actual search.
38 *
39 * @param ctx
40 * the DirContext on which to work.
41 * @return the NamingEnumeration resulting from the search operation.
42 * @throws NamingException
43 * if the search results in one.
44 */
45 public NamingEnumeration executeSearch(DirContext ctx)
46 throws NamingException;
47 }