public class AggregateDnResolver extends Object implements DnResolver
Modifier and Type | Class and Description |
---|---|
static class |
AggregateDnResolver.AuthenticationHandler
Used in conjunction with an
AggregateDnResolver to authenticate the resolved DN. |
static class |
AggregateDnResolver.AuthenticationResponseHandler
Used in conjunction with an
AggregateDnResolver to execute a list of response handlers. |
static class |
AggregateDnResolver.EntryResolver
Used in conjunction with an
AggregateDnResolver to resolve an entry. |
Modifier and Type | Field and Description |
---|---|
private boolean |
allowMultipleDns
Whether to throw an exception if multiple DNs are found.
|
private Map<String,DnResolver> |
dnResolvers
Labeled DN resolvers.
|
protected Logger |
logger
Logger for this class.
|
private ExecutorService |
service
To submit operations to.
|
Constructor and Description |
---|
AggregateDnResolver()
Default constructor.
|
AggregateDnResolver(Map<String,DnResolver> resolvers)
Creates a new aggregate dn resolver.
|
AggregateDnResolver(Map<String,DnResolver> resolvers,
ExecutorService es)
Creates a new aggregate dn resolver.
|
Modifier and Type | Method and Description |
---|---|
AggregateDnResolver.EntryResolver |
createEntryResolver(EntryResolver resolver)
Creates an aggregate entry resolver using the labels from the DN resolver and the supplied entry resolver.
|
protected void |
finalize() |
boolean |
getAllowMultipleDns()
Returns whether DN resolution should fail if multiple DNs are found.
|
Map<String,DnResolver> |
getDnResolvers()
Returns the DN resolvers to aggregate over.
|
String |
resolve(User user)
Attempts to find the LDAP DN for the supplied user.
|
void |
setAllowMultipleDns(boolean b)
Sets whether DN resolution should fail if multiple DNs are found If false an exception will be thrown if
resolve(User) finds that more than one DN resolver returns a DN. |
void |
setDnResolvers(Map<String,DnResolver> resolvers)
Sets the DN resolvers to aggregate over.
|
void |
shutdown()
Invokes
ExecutorService.shutdown() on the underlying executor service. |
protected final Logger logger
private final ExecutorService service
private Map<String,DnResolver> dnResolvers
private boolean allowMultipleDns
public AggregateDnResolver()
public AggregateDnResolver(Map<String,DnResolver> resolvers)
resolvers
- dn resolverspublic AggregateDnResolver(Map<String,DnResolver> resolvers, ExecutorService es)
resolvers
- dn resolverses
- executor service for invoking DN resolverspublic Map<String,DnResolver> getDnResolvers()
public void setDnResolvers(Map<String,DnResolver> resolvers)
resolvers
- to setpublic boolean getAllowMultipleDns()
public void setAllowMultipleDns(boolean b)
resolve(User)
finds that more than one DN resolver returns a DN. Otherwise the first DN found is returned.b
- whether multiple DNs are allowedpublic AggregateDnResolver.EntryResolver createEntryResolver(EntryResolver resolver)
resolver
- used for every labelpublic String resolve(User user) throws LdapException
DnResolver
resolve
in interface DnResolver
user
- to find DN forLdapException
- if an LDAP error occurspublic void shutdown()
ExecutorService.shutdown()
on the underlying executor service.Copyright © 2003-2019 Virginia Tech. All Rights Reserved.