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. |
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger
Logger for this class.
|
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 |
---|---|
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(String 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(String) 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. |
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(String)
finds that more than one DN resolver returns a DN. Otherwise the first DN found is returned.b
- whether multiple DNs are allowedpublic String resolve(String 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 © 2022. All rights reserved.