Class LDAPConnectionOptions


  • public class LDAPConnectionOptions
    extends Object
    This class defines options used while creating an LDAP connection to the server.
    • 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​(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 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:
        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.