org.ldaptive
Class ConnectionConfig

java.lang.Object
  extended by org.ldaptive.AbstractConfig
      extended by org.ldaptive.ConnectionConfig

public class ConnectionConfig
extends AbstractConfig

Contains all the configuration data needed to control connections.

Version:
$Revision: 3161 $ $Date: 2016-10-05 16:40:19 -0400 (Wed, 05 Oct 2016) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.AbstractConfig
logger
 
Constructor Summary
ConnectionConfig()
          Default constructor.
ConnectionConfig(String url)
          Creates a new connection config.
 
Method Summary
 ConnectionInitializer getConnectionInitializer()
          Returns the connection initializer.
 long getConnectTimeout()
          Returns the connect timeout.
 String getConnectTimeoutDuration()
          Returns the connect timeout as a duration.
 String getLdapUrl()
          Returns the ldap url.
 long getResponseTimeout()
          Returns the response timeout.
 String getResponseTimeoutDuration()
          Returns the response timeout as a duration.
 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 setConnectTimeout(long time)
          Sets the maximum amount of time in milliseconds that connects will block.
 void setConnectTimeoutDuration(String time)
          Sets the maximum amount of time that connects will block.
 void setLdapUrl(String url)
          Sets the ldap url.
 void setResponseTimeout(long time)
          Sets the maximum amount of time that operations will wait for a response.
 void setResponseTimeoutDuration(String 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()
          
 
Methods inherited from class org.ldaptive.AbstractConfig
checkImmutable, checkStringInput, makeImmutable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionConfig

public ConnectionConfig()
Default constructor.


ConnectionConfig

public ConnectionConfig(String url)
Creates a new connection config.

Parameters:
url - to connect to
Method Detail

getLdapUrl

public String getLdapUrl()
Returns the ldap url.

Returns:
ldap url

setLdapUrl

public void setLdapUrl(String url)
Sets the ldap url.

Parameters:
url - of the ldap

getConnectTimeout

public long getConnectTimeout()
Returns the connect timeout. If this value is <= 0, then connects will wait indefinitely.

Returns:
timeout

setConnectTimeout

public void setConnectTimeout(long time)
Sets the maximum amount of time in milliseconds that connects will block.

Parameters:
time - timeout for connects

getConnectTimeoutDuration

public String getConnectTimeoutDuration()
Returns the connect timeout as a duration.

Returns:
timeout in duration syntax

setConnectTimeoutDuration

public void setConnectTimeoutDuration(String time)
Sets the maximum amount of time that connects will block.

Parameters:
time - in duration sytanx or in milliseconds

getResponseTimeout

public long getResponseTimeout()
Returns the response timeout. If this value is <= 0, then operations will wait indefinitely for a response.

Returns:
timeout

setResponseTimeout

public void setResponseTimeout(long time)
Sets the maximum amount of time that operations will wait for a response.

Parameters:
time - in duration syntax or in milliseconds

getResponseTimeoutDuration

public String getResponseTimeoutDuration()
Returns the response timeout as a duration.

Returns:
timeout in duration syntax

setResponseTimeoutDuration

public void setResponseTimeoutDuration(String time)
Sets the maximum amount of time that operations will wait for a response.

Parameters:
time - timeout for responses

getSslConfig

public SslConfig getSslConfig()
Returns the ssl config.

Returns:
ssl config

setSslConfig

public void setSslConfig(SslConfig config)
Sets the ssl config.

Parameters:
config - ssl config

getUseSSL

public boolean getUseSSL()
Returns whether the SSL protocol will be used for connections.

Returns:
whether the SSL protocol will be used

setUseSSL

public void setUseSSL(boolean b)
Sets whether the SSL protocol will be used for connections.

Parameters:
b - whether the SSL protocol will be used

getUseStartTLS

public boolean getUseStartTLS()
Returns whether startTLS will be used for connections.

Returns:
whether startTLS will be used

setUseStartTLS

public void setUseStartTLS(boolean b)
Sets whether startTLS will be used for connections.

Parameters:
b - whether startTLS will be used

getConnectionInitializer

public ConnectionInitializer getConnectionInitializer()
Returns the connection initializer.

Returns:
connection initializer

setConnectionInitializer

public void setConnectionInitializer(ConnectionInitializer initializer)
Sets the connection initializer.

Parameters:
initializer - connection initializer

newConnectionConfig

public static ConnectionConfig newConnectionConfig(ConnectionConfig config)
Returns a connection config initialized with the supplied config.

Parameters:
config - connection config to read properties from
Returns:
connection config

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.