Package org.opends.server.tools
Class LDAPConnectionOptions
- java.lang.Object
-
- org.opends.server.tools.LDAPConnectionOptions
-
public class LDAPConnectionOptions extends Object
This class defines options used while creating an LDAP connection to the server.
-
-
Constructor Summary
Constructors Constructor Description LDAPConnectionOptions()Creates a the connection options instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddSASLProperty(String property)Add a property to the list of SASL properties.booleangetReportAuthzID()Indicates whether to request that the server return the authorization ID in the bind response.StringgetSASLMechanism()Get the SASL mechanism used for authentication.Map<String,List<String>>getSASLProperties()Get the SASL options used for authentication.SSLConnectionFactorygetSSLConnectionFactory()Return the SSLConnectionFactory instance.intgetVersionNumber()Get the LDAP version number.booleanisVerbose()Indicates whether verbose tracing is enabled.voidsetReportAuthzID(boolean reportAuthzID)Specifies whether to request that the server return the authorization ID in the bind response.voidsetSASLExternal(boolean saslExternal)Set whether to use SASL EXTERNAL for the connection or not.booleansetSASLMechanism(String mechanism)Set the SASL mechanism used for authentication.voidsetSSLConnectionFactory(SSLConnectionFactory sslConnectionFactory)Set the SSL connection factory to use to create SSL connections.voidsetStartTLS(boolean startTLS)Set whether to use startTLS for the connection or not.voidsetUsePasswordPolicyControl(boolean usePasswordPolicyControl)Specifies whether to use the password policy control in the bind request.voidsetUseSSL(boolean useSSL)Set whether to use SSL for the connection or not.voidsetVerbose(boolean verbose)Specifies whether verbose tracing should be enabled.voidsetVersionNumber(int version)Set the LDAP version number.booleanusePasswordPolicyControl()Indicates whether to use the password policy control in the bind request.booleanuseSASLExternal()Return the saslExternal flag value.booleanuseSSL()Return the useSSL flag value.booleanuseStartTLS()Return the startTLS flag value.
-
-
-
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:
trueif SSL should be used, orfalseif 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:
trueif StartTLS should be used, orfalseif 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:
trueif SASL EXTERNAL should be used, orfalseif 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(String mechanism)
Set the SASL mechanism used for authentication.- Parameters:
mechanism- The SASL mechanism string, in "name=value" form.- Returns:
trueif the SASL mechanism was set, orfalseif not.
-
getSASLMechanism
public String getSASLMechanism()
Get the SASL mechanism used for authentication.- Returns:
- The SASL mechanism used for authentication.
-
getSASLProperties
public Map<String,List<String>> getSASLProperties()
Get the SASL options used for authentication.The returned map is the live set of properties: callers may add or remove properties through it, as the DSML gateway does when it drops the authorization identity.
- Returns:
- The SASL options used for authentication.
-
addSASLProperty
public boolean addSASLProperty(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:
trueif the property was set properly, orfalseif 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:
trueif the server should include the authorization ID in the bind response, orfalseif 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:
trueif the password policy control should be included in the bind request, orfalseif 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:
trueif 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.
-
-