org.apache.directory.ldap.client.api
Class LdapConnectionConfig

java.lang.Object
  extended by org.apache.directory.ldap.client.api.LdapConnectionConfig

public class LdapConnectionConfig
extends Object

A class to hold the configuration for creating an LdapConnection.

Author:
Apache Directory Project

Field Summary
static String DEFAULT_LDAP_HOST
          The default host : localhost
static int DEFAULT_LDAP_PORT
          Default ports for LDAP
static int DEFAULT_LDAPS_PORT
          Default port for LDAPS
static String DEFAULT_SSL_PROTOCOL
          the default protocol used for creating SSL context
static long DEFAULT_TIMEOUT
          The default timeout for operation : 30 seconds
static int LDAP_V3
          The LDAP version
 
Constructor Summary
LdapConnectionConfig()
          Creates a default LdapConnectionConfig instance
 
Method Summary
 org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector getBinaryAttributeDetector()
           
 String getCredentials()
          Gets the credentials.
 String getDefaultLdapHost()
          Gets the default LDAP host.
 int getDefaultLdapPort()
          Gets the default LDAP port.
 int getDefaultLdapsPort()
          Gets the default LDAPS port.
 long getDefaultTimeout()
          Gets the default timeout.
 String[] getEnabledCipherSuites()
          Gets the cipher suites which are enabled.
 KeyManager[] getKeyManagers()
          Gets the key managers.
 String getLdapHost()
          Gets the LDAP host.
 int getLdapPort()
          Gets the LDAP port.
 String getName()
          Gets the name that is used to authenticate the user.
 SecureRandom getSecureRandom()
          Gets the secure random.
 String getSslProtocol()
          Gets the SSL protocol.
 int getSupportedLdapVersion()
          Gets the supported LDAP version.
 TrustManager[] getTrustManagers()
          Gets the trust managers.
 boolean isUseSsl()
          Checks if SSL (ldaps://) is used.
 void setBinaryAttributeDetector(org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector binaryAttributeDetector)
           
 void setCredentials(String credentials)
          Sets the credentials.
 void setEnabledCipherSuites(String[] enabledCipherSuites)
          Sets the cipher suites which are enabled
 void setKeyManagers(KeyManager[] keyManagers)
          Sets the key managers.
 void setLdapHost(String ldapHost)
          Sets the LDAP host.
 void setLdapPort(int ldapPort)
          Sets the LDAP port.
 void setName(String name)
          Sets the name which is used to authenticate the user.
 void setSecureRandom(SecureRandom secureRandom)
          Sets the secure random.
 void setSslProtocol(String sslProtocol)
          Sets the SSL protocol.
 void setTrustManagers(TrustManager... trustManagers)
          Sets the trust managers.
 void setUseSsl(boolean useSsl)
          Sets whether SSL should be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LDAP_PORT

public static final int DEFAULT_LDAP_PORT
Default ports for LDAP

See Also:
Constant Field Values

DEFAULT_LDAPS_PORT

public static final int DEFAULT_LDAPS_PORT
Default port for LDAPS

See Also:
Constant Field Values

DEFAULT_LDAP_HOST

public static final String DEFAULT_LDAP_HOST
The default host : localhost

See Also:
Constant Field Values

LDAP_V3

public static final int LDAP_V3
The LDAP version

See Also:
Constant Field Values

DEFAULT_TIMEOUT

public static final long DEFAULT_TIMEOUT
The default timeout for operation : 30 seconds

See Also:
Constant Field Values

DEFAULT_SSL_PROTOCOL

public static final String DEFAULT_SSL_PROTOCOL
the default protocol used for creating SSL context

See Also:
Constant Field Values
Constructor Detail

LdapConnectionConfig

public LdapConnectionConfig()
Creates a default LdapConnectionConfig instance

Method Detail

isUseSsl

public boolean isUseSsl()
Checks if SSL (ldaps://) is used.

Returns:
true, if SSL is used

setUseSsl

public void setUseSsl(boolean useSsl)
Sets whether SSL should be used.

Parameters:
useSsl - true to use SSL

getLdapPort

public int getLdapPort()
Gets the LDAP port.

Returns:
the LDAP port

setLdapPort

public void setLdapPort(int ldapPort)
Sets the LDAP port.

Parameters:
ldapPort - the new LDAP port

getLdapHost

public String getLdapHost()
Gets the LDAP host.

Returns:
the LDAP host

setLdapHost

public void setLdapHost(String ldapHost)
Sets the LDAP host.

Parameters:
ldapHost - the new LDAP host

getName

public String getName()
Gets the name that is used to authenticate the user.

Returns:
the name

setName

public void setName(String name)
Sets the name which is used to authenticate the user.

Parameters:
name - the new name

getCredentials

public String getCredentials()
Gets the credentials.

Returns:
the credentials

setCredentials

public void setCredentials(String credentials)
Sets the credentials.

Parameters:
credentials - the new credentials

getDefaultLdapPort

public int getDefaultLdapPort()
Gets the default LDAP port.

Returns:
the default LDAP port

getDefaultLdapsPort

public int getDefaultLdapsPort()
Gets the default LDAPS port.

Returns:
the default LDAPS port

getDefaultLdapHost

public String getDefaultLdapHost()
Gets the default LDAP host.

Returns:
the default LDAP host

getDefaultTimeout

public long getDefaultTimeout()
Gets the default timeout.

Returns:
the default timeout

getSupportedLdapVersion

public int getSupportedLdapVersion()
Gets the supported LDAP version.

Returns:
the supported LDAP version

getTrustManagers

public TrustManager[] getTrustManagers()
Gets the trust managers.

Returns:
the trust managers

setTrustManagers

public void setTrustManagers(TrustManager... trustManagers)
Sets the trust managers.

Parameters:
trustManagers - the new trust managers

getSslProtocol

public String getSslProtocol()
Gets the SSL protocol.

Returns:
the SSL protocol

setSslProtocol

public void setSslProtocol(String sslProtocol)
Sets the SSL protocol.

Parameters:
sslProtocol - the new SSL protocol

getKeyManagers

public KeyManager[] getKeyManagers()
Gets the key managers.

Returns:
the key managers

setKeyManagers

public void setKeyManagers(KeyManager[] keyManagers)
Sets the key managers.

Parameters:
keyManagers - the new key managers

getSecureRandom

public SecureRandom getSecureRandom()
Gets the secure random.

Returns:
the secure random

setSecureRandom

public void setSecureRandom(SecureRandom secureRandom)
Sets the secure random.

Parameters:
secureRandom - the new secure random

getEnabledCipherSuites

public String[] getEnabledCipherSuites()
Gets the cipher suites which are enabled.

Returns:
the cipher suites which are enabled

setEnabledCipherSuites

public void setEnabledCipherSuites(String[] enabledCipherSuites)
Sets the cipher suites which are enabled

Parameters:
enabledCipherSuites - the cipher suites which are enabled

getBinaryAttributeDetector

public org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector getBinaryAttributeDetector()
Returns:
the binaryAttributeDetector

setBinaryAttributeDetector

public void setBinaryAttributeDetector(org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector binaryAttributeDetector)
Parameters:
binaryAttributeDetector - the binaryAttributeDetector to set


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.