public class ConnectionConfig extends AbstractConfig
Modifier and Type | Field and Description |
---|---|
private ConnectionInitializer |
connectionInitializer
Connection initializer to execute on
Connection.open() . |
private ConnectionStrategy |
connectionStrategy
Connection strategy.
|
private Duration |
connectTimeout
Duration of time that connects will block.
|
private String |
ldapUrl
URL to the LDAP(s).
|
private Duration |
responseTimeout
Duration of time to wait for responses.
|
private SslConfig |
sslConfig
Configuration for SSL and startTLS connections.
|
private boolean |
useSSL
Connect to LDAP using SSL protocol.
|
private boolean |
useStartTLS
Connect to LDAP using startTLS.
|
logger
Constructor and Description |
---|
ConnectionConfig()
Default constructor.
|
ConnectionConfig(String url)
Creates a new connection config.
|
Modifier and Type | Method and Description |
---|---|
ConnectionInitializer |
getConnectionInitializer()
Returns the connection initializer.
|
ConnectionStrategy |
getConnectionStrategy()
Returns the connection strategy.
|
Duration |
getConnectTimeout()
Returns the connect timeout.
|
String |
getLdapUrl()
Returns the ldap url.
|
Duration |
getResponseTimeout()
Returns the response timeout.
|
SslConfig |
getSslConfig()
Returns the ssl config.
|
boolean |
getUseSSL()
Returns whether the SSL protocol will be used for connections.
|
boolean |
getUseStartTLS()
Returns whether startTLS will be used for connections.
|
static ConnectionConfig |
newConnectionConfig(ConnectionConfig config)
Returns a connection config initialized with the supplied config.
|
void |
setConnectionInitializer(ConnectionInitializer initializer)
Sets the connection initializer.
|
void |
setConnectionStrategy(ConnectionStrategy strategy)
Sets the connection strategy.
|
void |
setConnectTimeout(Duration time)
Sets the maximum amount of time that connects will block.
|
void |
setLdapUrl(String url)
Sets the ldap url.
|
void |
setResponseTimeout(Duration time)
Sets the maximum amount of time that operations will wait for a response.
|
void |
setSslConfig(SslConfig config)
Sets the ssl config.
|
void |
setUseSSL(boolean b)
Sets whether the SSL protocol will be used for connections.
|
void |
setUseStartTLS(boolean b)
Sets whether startTLS will be used for connections.
|
String |
toString() |
checkImmutable, checkStringInput, makeImmutable
private String ldapUrl
private Duration connectTimeout
private Duration responseTimeout
private SslConfig sslConfig
private boolean useSSL
private boolean useStartTLS
private ConnectionInitializer connectionInitializer
Connection.open()
.private ConnectionStrategy connectionStrategy
public ConnectionConfig()
public ConnectionConfig(String url)
url
- to connect topublic String getLdapUrl()
public void setLdapUrl(String url)
url
- of the ldappublic Duration getConnectTimeout()
public void setConnectTimeout(Duration time)
time
- timeout for connectspublic Duration getResponseTimeout()
public void setResponseTimeout(Duration time)
time
- timeout for responsespublic SslConfig getSslConfig()
public void setSslConfig(SslConfig config)
config
- ssl configpublic boolean getUseSSL()
public void setUseSSL(boolean b)
b
- whether the SSL protocol will be usedpublic boolean getUseStartTLS()
public void setUseStartTLS(boolean b)
b
- whether startTLS will be usedpublic ConnectionInitializer getConnectionInitializer()
public void setConnectionInitializer(ConnectionInitializer initializer)
initializer
- connection initializerpublic ConnectionStrategy getConnectionStrategy()
public void setConnectionStrategy(ConnectionStrategy strategy)
strategy
- for making connectionspublic static ConnectionConfig newConnectionConfig(ConnectionConfig config)
config
- connection config to read properties fromCopyright © 2003-2019 Virginia Tech. All Rights Reserved.