Package com.nimbusds.common.config
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 Summary
Modifier and TypeFieldDescriptionfinal long
The maximum time in milliseconds that a connection in this pool may be established before it should be closed and replaced with another connection.final int
The initial connection pool size.final int
The maximum length of time in milliseconds to wait for a connection to become available when trying to obtain a connection from the pool.final int
The target connection pool size.static final int
The default maximum connection time.static final int
The default initial connection pool size (zero connections).static final int
The default connection pool maximum wait time, in milliseconds.static final int
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
ConstructorDescriptionLDAPServerConnectionPoolDetails
(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. -
Method Summary
-
Field Details
-
connectionPoolSize
The target connection pool size. Must be greater than zero.Property key: [prefix]connectionPoolSize
-
DEFAULT_CONNECTION_POOL_SIZE
The default target connection pool size (5 connections).- See Also:
-
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
The default initial connection pool size (zero connections).- See Also:
-
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
The default connection pool maximum wait time, in milliseconds.- See Also:
-
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
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 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 Details
-
log
Logs the configuration details at INFO level.- Specified by:
log
in interfaceLoggableConfiguration
- Overrides:
log
in classLDAPServerDetails
-