public class ValidatingPoolableLdapConnectionFactory extends AbstractPoolableLdapConnectionFactory
bind()anonymousBind()bind(String)bind(String, String)bind(Dn)bind(Dn, String)bind(BindRequest)extended(String) where oid is StartTLSextended(String, byte[]) where oid is StartTLSextended(String) where oid is StartTLSextended(String, byte[]) where oid is StartTLSextended(ExtendedRequest) where ExtendedRequest is StartTLSDefaultPoolableLdapConnectionFactory may be the right choice.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOG
This class logger
|
connectionFactory, validator| Constructor and Description |
|---|
ValidatingPoolableLdapConnectionFactory(LdapConnectionConfig config)
Creates a new instance of ValidatingPoolableLdapConnectionFactory.
|
ValidatingPoolableLdapConnectionFactory(LdapConnectionConfig config,
Class<? extends LdapConnectionFactory> connectionFactoryClass)
Creates a new instance of ValidatingPoolableLdapConnectionFactory.
|
ValidatingPoolableLdapConnectionFactory(LdapConnectionFactory connectionFactory)
Creates a new instance of ValidatingPoolableLdapConnectionFactory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateObject(LdapConnection connection)
There is nothing to do to activate a connection.
|
MonitoringLdapConnection |
makeObject()
Specifically, we are creating a new connection based on the LdapConnection Factory
we used to create this pool of connections.
|
void |
passivateObject(LdapConnection connection)
We don't do anything with the connection.
|
destroyObject, getLdapApiService, newLdapConnectionFactory, setValidator, validateObjectpublic ValidatingPoolableLdapConnectionFactory(LdapConnectionConfig config)
config - the configuration for creating LdapConnectionspublic ValidatingPoolableLdapConnectionFactory(LdapConnectionConfig config, Class<? extends LdapConnectionFactory> connectionFactoryClass)
connectionFactoryClass must have a public constructor accepting
an LdapConnectionConfig object or an
IllegalArgumentException will be thrown.config - the configuration for creating LdapConnectionsconnectionFactoryClass - An implementation class of for the
LDAP connection factory.IllegalArgumentException - If the instantiation of an instance of
the connectionFactoryClass fails.public ValidatingPoolableLdapConnectionFactory(LdapConnectionFactory connectionFactory)
connectionFactory - the connection factory for creating LdapConnectionspublic void activateObject(LdapConnection connection) throws org.apache.directory.api.ldap.model.exception.LdapException
activateObject in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>activateObject in class AbstractPoolableLdapConnectionFactoryorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic MonitoringLdapConnection makeObject() throws org.apache.directory.api.ldap.model.exception.LdapException
makeObject in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>makeObject in class AbstractPoolableLdapConnectionFactoryorg.apache.directory.api.ldap.model.exception.LdapException - If unable to connect.public void passivateObject(LdapConnection connection) throws org.apache.directory.api.ldap.model.exception.LdapException
passivateObject in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>passivateObject in class AbstractPoolableLdapConnectionFactoryorg.apache.directory.api.ldap.model.exception.LdapException - If unable to reconfigure and rebind.Copyright © 2009–2017 The Apache Software Foundation. All rights reserved.