Package org.ldaptive.provider.jldap
Class JLdapStartTLSConnectionFactory
- java.lang.Object
-
- org.ldaptive.provider.AbstractProviderConnectionFactory<JLdapProviderConfig>
-
- org.ldaptive.provider.jldap.AbstractJLdapConnectionFactory<JLdapStartTLSConnection>
-
- org.ldaptive.provider.jldap.JLdapStartTLSConnectionFactory
-
- All Implemented Interfaces:
ProviderConnectionFactory<JLdapProviderConfig>
public class JLdapStartTLSConnectionFactory extends AbstractJLdapConnectionFactory<JLdapStartTLSConnection>
Creates ldap connections using the JLDAP LDAPConnection class with the startTLS extended operation.
-
-
Field Summary
Fields Modifier and Type Field Description private SSLSocketFactorysslSocketFactorySSL socket factory to use for startTLS.-
Fields inherited from class org.ldaptive.provider.AbstractProviderConnectionFactory
logger
-
-
Constructor Summary
Constructors Constructor Description JLdapStartTLSConnectionFactory(String url, ConnectionStrategy strategy, JLdapProviderConfig config, com.novell.ldap.LDAPConstraints constraints, Duration timeOut, SSLSocketFactory factory)Creates a new jldap tls connection factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JLdapStartTLSConnectioncreateJLdapConnection(com.novell.ldap.LDAPConnection conn, JLdapProviderConfig config)Creates a jldap connection of the appropriate type for this connection factory.protected 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.jldap.AbstractJLdapConnectionFactory
createInternal
-
Methods inherited from class org.ldaptive.provider.AbstractProviderConnectionFactory
create, getMetadata, getProviderConfig, toString
-
-
-
-
Field Detail
-
sslSocketFactory
private final SSLSocketFactory sslSocketFactory
SSL socket factory to use for startTLS.
-
-
Constructor Detail
-
JLdapStartTLSConnectionFactory
public JLdapStartTLSConnectionFactory(String url, ConnectionStrategy strategy, JLdapProviderConfig config, com.novell.ldap.LDAPConstraints constraints, Duration timeOut, SSLSocketFactory factory)
Creates a new jldap tls connection factory.- Parameters:
url- of the ldap to connect tostrategy- connection strategyconfig- provider configurationconstraints- connection constraintstimeOut- time in milliseconds that operations will waitfactory- SSL socket factory
-
-
Method Detail
-
createLDAPConnection
protected com.novell.ldap.LDAPConnection createLDAPConnection() throws com.novell.ldap.LDAPExceptionDescription copied from class:AbstractJLdapConnectionFactoryCreates an ldap connection for use with this connection factory.- Specified by:
createLDAPConnectionin classAbstractJLdapConnectionFactory<JLdapStartTLSConnection>- 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.LDAPExceptionDescription copied from class:AbstractJLdapConnectionFactoryInitialize the supplied connection after a connection has been established.- Overrides:
initializeConnectionin classAbstractJLdapConnectionFactory<JLdapStartTLSConnection>- Parameters:
conn- to initialize- Throws:
com.novell.ldap.LDAPException- if an error occurs initializing the connection
-
createJLdapConnection
protected JLdapStartTLSConnection createJLdapConnection(com.novell.ldap.LDAPConnection conn, JLdapProviderConfig config)
Description copied from class:AbstractJLdapConnectionFactoryCreates a jldap connection of the appropriate type for this connection factory.- Specified by:
createJLdapConnectionin classAbstractJLdapConnectionFactory<JLdapStartTLSConnection>- Parameters:
conn- to create jldap connection withconfig- provider configuration- Returns:
- jldap connection
-
-