public interface ContextExecutor<T>
DirContext
. For searches, use SearchExecutor
in
stead. A typical usage of this interface could be e.g.:
ContextExecutor executor = new ContextExecutor() { public Object executeWithContext(DirContext ctx) throws NamingException { return ctx.lookup(dn); } };
LdapTemplate.executeReadOnly(ContextExecutor)
,
LdapTemplate.executeReadWrite(ContextExecutor)
Modifier and Type | Method and Description |
---|---|
T |
executeWithContext(DirContext ctx)
Perform any operation on the context.
|
T executeWithContext(DirContext ctx) throws NamingException
ctx
- the DirContext to perform the operation on.NamingException
- if the operation resulted in one.