Package com.nimbusds.common.ldap
Class LDAPConnectionPoolFactory
java.lang.Object
com.nimbusds.common.ldap.LDAPConnectionPoolFactory
Factory for establishing LDAP connection pools to a directory server.
-
Constructor Summary
ConstructorDescriptionLDAPConnectionPoolFactory
(LDAPServerConnectionPoolDetails ldapServer, CustomTrustStoreConfiguration customTrustStore, CustomKeyStoreConfiguration customKeyStore, DirectoryUser dirUser) Creates a LDAP connection pool factory. -
Method Summary
Modifier and TypeMethodDescriptioncom.unboundid.ldap.sdk.LDAPConnectionPool
Creates a new LDAP connection pool.
-
Constructor Details
-
LDAPConnectionPoolFactory
public LDAPConnectionPoolFactory(LDAPServerConnectionPoolDetails ldapServer, CustomTrustStoreConfiguration customTrustStore, CustomKeyStoreConfiguration customKeyStore, DirectoryUser dirUser) Creates a LDAP connection pool factory.- Parameters:
ldapServer
- The LDAP server connect details. Must specify a URL and must not benull
.customTrustStore
- The custom trust store configuration. Must not benull
.customKeyStore
- The custom key store configuration. Must not benull
.dirUser
- The directory user to bind to for each LDAP connection. Ifnull
connections will be unauthenticated.
-
-
Method Details
-
createLDAPConnectionPool
public com.unboundid.ldap.sdk.LDAPConnectionPool createLDAPConnectionPool() throws GeneralSecurityException, com.unboundid.ldap.sdk.LDAPExceptionCreates a new LDAP connection pool. No initial connections are established, to prevent connect exceptions if the backend is offline at the time the pool is created.- Returns:
- The LDAP connection pool.
- Throws:
KeyStoreException
- If the key store could not be unlocked (for SSL/StartTLS connections).GeneralSecurityException
- On a general security exception (for SSL/StartTLS connections).com.unboundid.ldap.sdk.LDAPException
- If an LDAP exception is encountered (during creation of the initial pooled LDAP connections).
-