org.opends.server.tools
Class LDAPConnectionOptions

java.lang.Object
  extended by org.opends.server.tools.LDAPConnectionOptions

public class LDAPConnectionOptions
extends java.lang.Object

This class defines options used while creating an LDAP connection to the server.


Constructor Summary
LDAPConnectionOptions()
          Creates a the connection options instance.
 
Method Summary
 boolean addSASLProperty(java.lang.String property)
          Add a property to the list of SASL properties.
 boolean getReportAuthzID()
          Indicates whether to request that the server return the authorization ID in the bind response.
 java.lang.String getSASLMechanism()
          Get the SASL mechanism used for authentication.
 java.util.Map<java.lang.String,java.util.List<java.lang.String>> getSASLProperties()
          Get the SASL options used for authentication.
 SSLConnectionFactory getSSLConnectionFactory()
          Return the SSLConnectionFactory instance.
 int getVersionNumber()
          Get the LDAP version number.
 boolean isVerbose()
          Indicates whether verbose tracing is enabled.
 void setReportAuthzID(boolean reportAuthzID)
          Specifies whether to request that the server return the authorization ID in the bind response.
 void setSASLExternal(boolean saslExternal)
          Set whether to use SASL EXTERNAL for the connection or not.
 boolean setSASLMechanism(java.lang.String mechanism)
          Set the SASL mechanism used for authentication.
 void setSSLConnectionFactory(SSLConnectionFactory sslConnectionFactory)
          Set the SSL connection factory to use to create SSL connections.
 void setStartTLS(boolean startTLS)
          Set whether to use startTLS for the connection or not.
 void setUsePasswordPolicyControl(boolean usePasswordPolicyControl)
          Specifies whether to use the password policy control in the bind request.
 void setUseSSL(boolean useSSL)
          Set whether to use SSL for the connection or not.
 void setVerbose(boolean verbose)
          Specifies whether verbose tracing should be enabled.
 void setVersionNumber(int version)
          Set the LDAP version number.
 boolean usePasswordPolicyControl()
          Indicates whether to use the password policy control in the bind request.
 boolean useSASLExternal()
          Return the saslExternal flag value.
 boolean useSSL()
          Return the useSSL flag value.
 boolean useStartTLS()
          Return the startTLS flag value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPConnectionOptions

public LDAPConnectionOptions()
Creates a the connection options instance.

Method Detail

setUseSSL

public void setUseSSL(boolean useSSL)
Set whether to use SSL for the connection or not.

Parameters:
useSSL - True if SSL should be used, false otherwise.

useSSL

public boolean useSSL()
Return the useSSL flag value.

Returns:
true if SSL should be used, or false if not.

setStartTLS

public void setStartTLS(boolean startTLS)
Set whether to use startTLS for the connection or not.

Parameters:
startTLS - True if startTLS should be used, false otherwise.

useStartTLS

public boolean useStartTLS()
Return the startTLS flag value.

Returns:
true if StartTLS should be used, or false if not.

setSASLExternal

public void setSASLExternal(boolean saslExternal)
Set whether to use SASL EXTERNAL for the connection or not.

Parameters:
saslExternal - True if SASL EXTERNAL should be used, false otherwise.

useSASLExternal

public boolean useSASLExternal()
Return the saslExternal flag value.

Returns:
true if SASL EXTERNAL should be used, or false if not.

setSSLConnectionFactory

public void setSSLConnectionFactory(SSLConnectionFactory sslConnectionFactory)
Set the SSL connection factory to use to create SSL connections.

Parameters:
sslConnectionFactory - The SSL connection factory.

getSSLConnectionFactory

public SSLConnectionFactory getSSLConnectionFactory()
Return the SSLConnectionFactory instance.

Returns:
The SSL connection factory to use when establishing secure connections.

setSASLMechanism

public boolean setSASLMechanism(java.lang.String mechanism)
Set the SASL mechanism used for authentication.

Parameters:
mechanism - The SASL mechanism string, in "name=value" form.
Returns:
true if the SASL mechanism was set, or false if not.

getSASLMechanism

public java.lang.String getSASLMechanism()
Get the SASL mechanism used for authentication.

Returns:
The SASL mechanism used for authentication.

getSASLProperties

public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getSASLProperties()
Get the SASL options used for authentication.

Returns:
The SASL options used for authentication.

addSASLProperty

public boolean addSASLProperty(java.lang.String property)
Add a property to the list of SASL properties.

Parameters:
property - The property (in name=value form) to add to the set of SASL properties.
Returns:
true if the property was set properly, or false if not.

setVersionNumber

public void setVersionNumber(int version)
Set the LDAP version number.

Parameters:
version - The LDAP version number.

getVersionNumber

public int getVersionNumber()
Get the LDAP version number.

Returns:
The LDAP version number.

getReportAuthzID

public boolean getReportAuthzID()
Indicates whether to request that the server return the authorization ID in the bind response.

Returns:
true if the server should include the authorization ID in the bind response, or false if not.

setReportAuthzID

public void setReportAuthzID(boolean reportAuthzID)
Specifies whether to request that the server return the authorization ID in the bind response.

Parameters:
reportAuthzID - Specifies whether to request that the server return the authorization ID in the bind response.

usePasswordPolicyControl

public boolean usePasswordPolicyControl()
Indicates whether to use the password policy control in the bind request.

Returns:
true if the password policy control should be included in the bind request, or false if not.

setUsePasswordPolicyControl

public void setUsePasswordPolicyControl(boolean usePasswordPolicyControl)
Specifies whether to use the password policy control in the bind request.

Parameters:
usePasswordPolicyControl - Specifies whether to use the password policy control in the bind request.

isVerbose

public boolean isVerbose()
Indicates whether verbose tracing is enabled.

Returns:
true if verbose tracing is enabled.

setVerbose

public void setVerbose(boolean verbose)
Specifies whether verbose tracing should be enabled.

Parameters:
verbose - Specifies whether verbose tracing should be enabled.