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.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(org.apache.commons.pool2.PooledObject<LdapConnection> pooledObject)
There is nothing to do to activate a connection.
|
org.apache.commons.pool2.PooledObject<LdapConnection> |
makeObject()
Specifically, we are creating a new connection based on the LdapConnection Factory
we used to create this pool of connections.
|
void |
passivateObject(org.apache.commons.pool2.PooledObject<LdapConnection> pooledObject)
We don't do anything with the connection.
|
destroyObject, getLdapApiService, setValidator, validateObject
public 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(org.apache.commons.pool2.PooledObject<LdapConnection> pooledObject) throws LdapException
activateObject
in interface org.apache.commons.pool2.PooledObjectFactory<LdapConnection>
activateObject
in class AbstractPoolableLdapConnectionFactory
LdapException
public org.apache.commons.pool2.PooledObject<LdapConnection> makeObject() throws LdapException
makeObject
in interface org.apache.commons.pool2.PooledObjectFactory<LdapConnection>
makeObject
in class AbstractPoolableLdapConnectionFactory
LdapException
- If unable to connect.public void passivateObject(org.apache.commons.pool2.PooledObject<LdapConnection> pooledObject) throws LdapException
passivateObject
in interface org.apache.commons.pool2.PooledObjectFactory<LdapConnection>
passivateObject
in class AbstractPoolableLdapConnectionFactory
LdapException
- If unable to reconfigure and rebind.Copyright © 2003–2021 The Apache Software Foundation. All rights reserved.