Package org.ldaptive.provider.jldap
Class JLdapProvider
- java.lang.Object
-
- org.ldaptive.provider.jldap.JLdapProvider
-
- All Implemented Interfaces:
Provider<JLdapProviderConfig>
public class JLdapProvider extends Object implements Provider<JLdapProviderConfig>
JLdap provider implementation. Provides connection factories for clear, SSL, and TLS connections.
-
-
Field Summary
Fields Modifier and Type Field Description private JLdapProviderConfigconfigProvider configuration.
-
Constructor Summary
Constructors Constructor Description JLdapProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProviderConnectionFactory<JLdapProviderConfig>getConnectionFactory(ConnectionConfig cc)protected com.novell.ldap.LDAPConstraintsgetDefaultLDAPConstraints(ConnectionConfig cc)Returns the default connection constraints for this provider.protected SSLSocketFactorygetHostnameVerifierSocketFactory(ConnectionConfig cc)Returns an SSL socket factory configured with a default hostname verifier.protected JLdapConnectionFactorygetJLdapConnectionFactory(ConnectionConfig cc, com.novell.ldap.LDAPConstraints constraints)Returns a jldap connection factory using the properties found in the supplied connection config.protected JLdapSSLConnectionFactorygetJLdapSSLConnectionFactory(ConnectionConfig cc, com.novell.ldap.LDAPConstraints constraints)Returns a jldap SSL connection factory using the properties found in the supplied connection config.protected JLdapStartTLSConnectionFactorygetJLdapStartTLSConnectionFactory(ConnectionConfig cc, com.novell.ldap.LDAPConstraints constraints)Returns a jldap startTLS connection factory using the properties found in the supplied connection config.JLdapProviderConfiggetProviderConfig()JLdapProvidernewInstance()voidsetProviderConfig(JLdapProviderConfig pc)
-
-
-
Field Detail
-
config
private JLdapProviderConfig config
Provider configuration.
-
-
Method Detail
-
getConnectionFactory
public ProviderConnectionFactory<JLdapProviderConfig> getConnectionFactory(ConnectionConfig cc)
- Specified by:
getConnectionFactoryin interfaceProvider<JLdapProviderConfig>
-
getJLdapStartTLSConnectionFactory
protected JLdapStartTLSConnectionFactory getJLdapStartTLSConnectionFactory(ConnectionConfig cc, com.novell.ldap.LDAPConstraints constraints)
Returns a jldap startTLS connection factory using the properties found in the supplied connection config. If the supplied constraints is null, the environment is retrieved fromgetDefaultLDAPConstraints(ConnectionConfig).- Parameters:
cc- connection configconstraints- connection constraints or null to use the default- Returns:
- jndi startTLS connection factory
-
getJLdapSSLConnectionFactory
protected JLdapSSLConnectionFactory getJLdapSSLConnectionFactory(ConnectionConfig cc, com.novell.ldap.LDAPConstraints constraints)
Returns a jldap SSL connection factory using the properties found in the supplied connection config. If the supplied constraints is null, the environment is retrieved fromgetDefaultLDAPConstraints(ConnectionConfig).- Parameters:
cc- connection configconstraints- connection constraints or null to use the default- Returns:
- jndi SSL connection factory
-
getJLdapConnectionFactory
protected JLdapConnectionFactory getJLdapConnectionFactory(ConnectionConfig cc, com.novell.ldap.LDAPConstraints constraints)
Returns a jldap connection factory using the properties found in the supplied connection config. If the supplied constraints is null, the environment is retrieved fromgetDefaultLDAPConstraints(ConnectionConfig).- Parameters:
cc- connection configconstraints- connection constraints or null to use the default- Returns:
- jndi connection factory
-
getHostnameVerifierSocketFactory
protected SSLSocketFactory getHostnameVerifierSocketFactory(ConnectionConfig cc)
Returns an SSL socket factory configured with a default hostname verifier.- Parameters:
cc- connection configuration- Returns:
- SSL socket factory
-
getDefaultLDAPConstraints
protected com.novell.ldap.LDAPConstraints getDefaultLDAPConstraints(ConnectionConfig cc)
Returns the default connection constraints for this provider.- Parameters:
cc- to configure options with- Returns:
- ldap connection constraints
-
getProviderConfig
public JLdapProviderConfig getProviderConfig()
- Specified by:
getProviderConfigin interfaceProvider<JLdapProviderConfig>
-
setProviderConfig
public void setProviderConfig(JLdapProviderConfig pc)
- Specified by:
setProviderConfigin interfaceProvider<JLdapProviderConfig>
-
newInstance
public JLdapProvider newInstance()
- Specified by:
newInstancein interfaceProvider<JLdapProviderConfig>
-
-