Package com.nimbusds.common.config
Class LDAPServerConnectionPoolDetails
- java.lang.Object
-
- com.nimbusds.common.config.LDAPServerDetails
-
- com.nimbusds.common.config.LDAPServerConnectionPoolDetails
-
- All Implemented Interfaces:
LoggableConfiguration
public class LDAPServerConnectionPoolDetails extends LDAPServerDetails
LDAP server connection pool details.The configuration is stored as public fields which become immutable (final) after their initialisation.
Property keys: [prefix]*
-
-
Field Summary
Fields Modifier and Type Field Description 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.int
connectionPoolInitialSize
The initial connection pool size.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.int
connectionPoolSize
The target connection pool size.static int
DEFAULT_CONNECTION_MAX_AGE
The default maximum connection time.static int
DEFAULT_CONNECTION_POOL_INITIAL_SIZE
The default initial connection pool size (zero connections).static int
DEFAULT_CONNECTION_POOL_MAX_WAIT_TIME
The default connection pool maximum wait time, in milliseconds.static int
DEFAULT_CONNECTION_POOL_SIZE
The default target connection pool size (5 connections).-
Fields inherited from class com.nimbusds.common.config.LDAPServerDetails
connectTimeout, DEFAULT_CONNECT_TIMEOUT, DEFAULT_RESPONSE_TIMEOUT, DEFAULT_SECURITY, DEFAULT_SELECTION_ALGORITHM, DEFAULT_SELF_SIGNED_CERTS_TRUST, responseTimeout, security, selectionAlgorithm, trustSelfSignedCerts, url
-
Fields inherited from interface com.nimbusds.common.config.LoggableConfiguration
LOG_CATEGORY
-
-
Constructor Summary
Constructors Constructor Description LDAPServerConnectionPoolDetails(String prefix, Properties props)
Creates a new LDAP server connection pool details instance from the specified properties.LDAPServerConnectionPoolDetails(String prefix, Properties props, boolean requireURL)
Creates a new LDAP server connection pool details instance from the specified properties.
-
-
-
Field Detail
-
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:
- Constant Field Values
-
connectionPoolInitialSize
public final int connectionPoolInitialSize
The initial connection pool size. Must be greater than zero and less or equal toconnectionPoolSize
.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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
-
Constructor Detail
-
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 benull
.props
- The properties. Must not benull
.- 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 benull
.props
- The properties. Must not benull
.- Throws:
com.thetransactioncompany.util.PropertyParseException
- On a missing or invalid property.
-
-
Method Detail
-
log
public void log()
Logs the configuration details at INFO level.- Specified by:
log
in interfaceLoggableConfiguration
- Overrides:
log
in classLDAPServerDetails
-
-