T
- type of provider config for this connection factorypublic abstract class AbstractProviderConnectionFactory<T extends ProviderConfig> extends Object implements ProviderConnectionFactory<T>
Modifier and Type | Class and Description |
---|---|
private class |
AbstractProviderConnectionFactory.DefaultConnectionFactoryMetadata
Provides an object to track the connection count.
|
Modifier and Type | Field and Description |
---|---|
private ConnectionStrategy |
connectionStrategy
Connection strategy.
|
protected Logger |
logger
Logger for this class.
|
private AbstractProviderConnectionFactory.DefaultConnectionFactoryMetadata |
metadata
Factory metadata.
|
private T |
providerConfig
Provider configuration.
|
Constructor and Description |
---|
AbstractProviderConnectionFactory(String url,
ConnectionStrategy strategy,
T config)
Creates a new abstract connection factory.
|
Modifier and Type | Method and Description |
---|---|
ProviderConnection |
create()
Create a connection to an LDAP.
|
protected abstract ProviderConnection |
createInternal(String url)
Create the provider connection and prepare the connection for use.
|
protected ConnectionFactoryMetadata |
getMetadata()
Returns the connection factory metadata.
|
T |
getProviderConfig()
Returns the provider configuration.
|
String |
toString() |
protected final Logger logger
private final T extends ProviderConfig providerConfig
private final AbstractProviderConnectionFactory.DefaultConnectionFactoryMetadata metadata
private final ConnectionStrategy connectionStrategy
public AbstractProviderConnectionFactory(String url, ConnectionStrategy strategy, T config)
AbstractConfig.makeImmutable()
.url
- of the ldap to connect tostrategy
- connection strategyconfig
- provider configurationpublic T getProviderConfig()
ProviderConnectionFactory
getProviderConfig
in interface ProviderConnectionFactory<T extends ProviderConfig>
protected ConnectionFactoryMetadata getMetadata()
public ProviderConnection create() throws LdapException
ProviderConnectionFactory
create
in interface ProviderConnectionFactory<T extends ProviderConfig>
LdapException
- if an LDAP error occursprotected abstract ProviderConnection createInternal(String url) throws LdapException
url
- to connect toLdapException
- if a connection cannot be establishedCopyright © 2003-2019 Virginia Tech. All Rights Reserved.