Package org.ldaptive.provider.jldap
Class AbstractJLdapConnectionFactory<T extends JLdapConnection>
- java.lang.Object
-
- org.ldaptive.provider.AbstractProviderConnectionFactory<JLdapProviderConfig>
-
- org.ldaptive.provider.jldap.AbstractJLdapConnectionFactory<T>
-
- Type Parameters:
T- type of jldap connection
- All Implemented Interfaces:
ProviderConnectionFactory<JLdapProviderConfig>
- Direct Known Subclasses:
JLdapConnectionFactory,JLdapSSLConnectionFactory,JLdapStartTLSConnectionFactory
public abstract class AbstractJLdapConnectionFactory<T extends JLdapConnection> extends AbstractProviderConnectionFactory<JLdapProviderConfig>
Base class for JLDAP connection factory implementations.
-
-
Field Summary
Fields Modifier and Type Field Description private com.novell.ldap.LDAPConstraintsldapConstraintsJLdap connection constraints.private DurationsocketTimeOutAmount of time in milliseconds that operations will wait.-
Fields inherited from class org.ldaptive.provider.AbstractProviderConnectionFactory
logger
-
-
Constructor Summary
Constructors Constructor Description AbstractJLdapConnectionFactory(String url, ConnectionStrategy strategy, JLdapProviderConfig config, com.novell.ldap.LDAPConstraints constraints, Duration timeOut)Creates a new abstract jldap connection factory.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected TcreateInternal(String url)protected abstract TcreateJLdapConnection(com.novell.ldap.LDAPConnection conn, JLdapProviderConfig config)Creates a jldap connection of the appropriate type for this connection factory.protected abstract com.novell.ldap.LDAPConnectioncreateLDAPConnection()Creates an ldap connection for use with this connection factory.protected voidinitializeConnection(com.novell.ldap.LDAPConnection conn)Initialize the supplied connection after a connection has been established.-
Methods inherited from class org.ldaptive.provider.AbstractProviderConnectionFactory
create, getMetadata, getProviderConfig, toString
-
-
-
-
Field Detail
-
ldapConstraints
private final com.novell.ldap.LDAPConstraints ldapConstraints
JLdap connection constraints.
-
socketTimeOut
private final Duration socketTimeOut
Amount of time in milliseconds that operations will wait.
-
-
Constructor Detail
-
AbstractJLdapConnectionFactory
public AbstractJLdapConnectionFactory(String url, ConnectionStrategy strategy, JLdapProviderConfig config, com.novell.ldap.LDAPConstraints constraints, Duration timeOut)
Creates a new abstract jldap connection factory.- Parameters:
url- of the ldap to connect tostrategy- connection strategyconfig- provider configurationconstraints- connection constraintstimeOut- time in milliseconds that operations will wait
-
-
Method Detail
-
createInternal
protected T createInternal(String url) throws LdapException
- Specified by:
createInternalin classAbstractProviderConnectionFactory<JLdapProviderConfig>- Throws:
LdapException
-
createLDAPConnection
protected abstract com.novell.ldap.LDAPConnection createLDAPConnection() throws com.novell.ldap.LDAPExceptionCreates an ldap connection for use with this connection factory.- Returns:
- ldap connection
- Throws:
com.novell.ldap.LDAPException- if an error occurs creating the connection
-
initializeConnection
protected void initializeConnection(com.novell.ldap.LDAPConnection conn) throws com.novell.ldap.LDAPExceptionInitialize the supplied connection after a connection has been established.- Parameters:
conn- to initialize- Throws:
com.novell.ldap.LDAPException- if an error occurs initializing the connection
-
createJLdapConnection
protected abstract T createJLdapConnection(com.novell.ldap.LDAPConnection conn, JLdapProviderConfig config)
Creates a jldap connection of the appropriate type for this connection factory.- Parameters:
conn- to create jldap connection withconfig- provider configuration- Returns:
- jldap connection
-
-