Package org.ldaptive.referral
Class PooledReferralConnectionFactory
java.lang.Object
org.ldaptive.referral.PooledReferralConnectionFactory
- All Implemented Interfaces:
ReferralConnectionFactory
Pooled implementation of a referral connection factory. Stores a map of connection URLs to
PooledConnectionFactory. Note that this class is intended to hold references to multiple connection pools until it
is closed.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether this connection factory has been closed.private final Map<String,PooledConnectionFactory> Map of connection URL to connection factories.private final PooledConnectionFactoryFactory to copy properties from. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new pooled referral connection factory. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes all the connection pools for this referral connection factory.private PooledConnectionFactorycopy(PooledConnectionFactory cf, String url) Creates a new instance of the supplied connection factory with the same settings.Returns a connection factory for use with a referral.toString()
-
Field Details
-
factories
Map of connection URL to connection factories. -
factory
Factory to copy properties from. -
closed
private boolean closedWhether this connection factory has been closed.
-
-
Constructor Details
-
PooledReferralConnectionFactory
Creates a new pooled referral connection factory.- Parameters:
cf- pooled connection factory to copy properties from
-
-
Method Details
-
copy
Creates a new instance of the supplied connection factory with the same settings.- Parameters:
cf- to copyurl- to set in the connection configuration- Returns:
- new pooled connection factory
-
getConnectionFactory
Description copied from interface:ReferralConnectionFactoryReturns a connection factory for use with a referral.- Specified by:
getConnectionFactoryin interfaceReferralConnectionFactory- Parameters:
url- LDAP URL to the referral server- Returns:
- connection factory
-
close
public void close()Closes all the connection pools for this referral connection factory. -
toString
-