Package com.nimbusds.common.ldap
Class LDAPConnectionPoolFactory
- java.lang.Object
-
- com.nimbusds.common.ldap.LDAPConnectionPoolFactory
-
public class LDAPConnectionPoolFactory extends Object
Factory for establishing LDAP connection pools to a directory server.
-
-
Constructor Summary
Constructors Constructor Description LDAPConnectionPoolFactory(LDAPServerConnectionPoolDetails ldapServer, CustomTrustStoreConfiguration customTrustStore, CustomKeyStoreConfiguration customKeyStore, DirectoryUser dirUser)
Creates a LDAP connection pool factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.unboundid.ldap.sdk.LDAPConnectionPool
createLDAPConnectionPool()
Creates a new LDAP connection pool.
-
-
-
Constructor Detail
-
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 Detail
-
createLDAPConnectionPool
public com.unboundid.ldap.sdk.LDAPConnectionPool createLDAPConnectionPool() throws GeneralSecurityException, com.unboundid.ldap.sdk.LDAPException
Creates 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).
-
-