Class LDAPServerConnectionPoolDetails

java.lang.Object
com.nimbusds.common.config.LDAPServerDetails
com.nimbusds.common.config.LDAPServerConnectionPoolDetails
All Implemented Interfaces:
LoggableConfiguration

LDAP server connection pool details.

The configuration is stored as public fields which become immutable (final) after their initialisation.

Property keys: [prefix]*

  • Field Details

    • connectionPoolSize

      public final int connectionPoolSize
      The target connection pool size. Must be greater than zero.

      Property key: [prefix]connectionPoolSize

    • DEFAULT_CONNECTION_POOL_SIZE

      public static final int DEFAULT_CONNECTION_POOL_SIZE
      The default target connection pool size (5 connections).
      See Also:
    • connectionPoolInitialSize

      public final int connectionPoolInitialSize
      The initial connection pool size. Must be greater than zero and less or equal to connectionPoolSize.

      Property key: [prefix]connectionPoolInitialSize

    • DEFAULT_CONNECTION_POOL_INITIAL_SIZE

      public static final int DEFAULT_CONNECTION_POOL_INITIAL_SIZE
      The default initial connection pool size (zero connections).
      See Also:
    • connectionPoolMaxWaitTime

      public final int connectionPoolMaxWaitTime
      The maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool. A value of zero should be used to indicate that the pool should not block at all if no connections are available and that it should either create a new connection or throw an exception.

      Property key: [prefix]connectionPoolMaxWaitTime

    • DEFAULT_CONNECTION_POOL_MAX_WAIT_TIME

      public static final int DEFAULT_CONNECTION_POOL_MAX_WAIT_TIME
      The default connection pool maximum wait time, in milliseconds.
      See Also:
    • connectionMaxAge

      public final long connectionMaxAge
      The maximum time in milliseconds that a connection in this pool may be established before it should be closed and replaced with another connection. A value of zero indicates that no maximum age should be enforced.

      Property key: [prefix]connectionMaxAge

    • DEFAULT_CONNECTION_MAX_AGE

      public static final int DEFAULT_CONNECTION_MAX_AGE
      The default maximum connection time.
      See Also:
  • Constructor Details

    • LDAPServerConnectionPoolDetails

      public LDAPServerConnectionPoolDetails(String prefix, Properties props) throws com.thetransactioncompany.util.PropertyParseException
      Creates a new LDAP server connection pool details instance from the specified properties.

      Mandatory properties:

      • [prefix]url

      Conditionally mandatory properties:

      • [prefix]selectionAlgorithm - if more than one LDAP server URL is specified.

      Optional properties, with defaults:

      • [prefix]security = STARTTLS
      • [prefix]connectTimeout = 0
      • [prefix]trustSelfSignedCerts = false
      • [prefix]connectionPoolSize = 5
      • [prefix]connectionPoolInitialSize = 0
      • [prefix]connectionPoolMaxWaitTime = 500
      • [prefix]connectionMaxAge = 0
      Parameters:
      prefix - The properties prefix. Must not be null.
      props - The properties. Must not be null.
      Throws:
      com.thetransactioncompany.util.PropertyParseException - On a missing or invalid property.
    • LDAPServerConnectionPoolDetails

      public LDAPServerConnectionPoolDetails(String prefix, Properties props, boolean requireURL) throws com.thetransactioncompany.util.PropertyParseException
      Creates a new LDAP server connection pool details instance from the specified properties.

      Mandatory properties:

      • none

      Conditionally mandatory properties:

      • [prefix]url
      • [prefix]selectionAlgorithm - if more than one LDAP server URL is specified.

      Optional properties, with defaults:

      • [prefix]security = STARTTLS
      • [prefix]connectTimeout = 0
      • [prefix]trustSelfSignedCerts = false
      • [prefix]connectionPoolSize = 5
      • [prefix]connectionPoolInitialSize = 0
      • [prefix]connectionPoolMaxWaitTime = 500
      • [prefix]connectionMaxAge = 0
      Parameters:
      prefix - The properties prefix. Must not be null.
      props - The properties. Must not be null.
      Throws:
      com.thetransactioncompany.util.PropertyParseException - On a missing or invalid property.
  • Method Details