org.springframework.ldap.core
Interface ContextExecutor
public interface ContextExecutor
Interface for delegating an actual operation to be performed on a
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);
}
};
- Author:
- Mattias Hellborg Arthursson
- See Also:
LdapTemplate.executeReadOnly(ContextExecutor)
,
LdapTemplate.executeReadWrite(ContextExecutor)
executeWithContext
Object executeWithContext(DirContext ctx)
throws NamingException
- Perform any operation on the context.
- Parameters:
ctx
- the DirContext to perform the operation on.
- Returns:
- any object resulting from the operation - might be null.
- Throws:
NamingException
- if the operation resulted in one.
Copyright © 2005-2010 The Spring LDAP Framework. All Rights Reserved.