private LdapNetworkConnection createLDAPConnection(String host, int port,
            EncryptionMethod encryptionMethod, int timeout)
            throws GuacamoleException {
        return createLDAPConnection(host, port, encryptionMethod,
                LDAPSSLProtocol.TLSv1_3, timeout);
    }
Creates a new instance of LdapNetworkConnection, configured as required
to use the given encryption method to communicate with the LDAP server
at the given hostname and port with the encryption method and timeout
specified, as well. The returned LdapNetworkConnection is configured
for use but is not yet connected nor bound to the LDAP server. It will
not be bound until a bind operation is explicitly requested, and will
not be connected until it is used in an LDAP operation (such as a bind).

@param host
    The hostname or IP address of the LDAP server.

@param port
    The TCP port that the LDAP server is listening on.

@param encryptionMethod
    The encryption method that should be used to communicate with the
    LDAP server.

@param timeout
    The maximum number of milliseconds to wait for a response from the
    LDAP server.

@return
    A new instance of LdapNetworkConnection which uses the given
    encryption method to communicate with the LDAP server at the given
    hostname and port.

@throws GuacamoleException
    If the requested encryption method is actually not implemented (a
    bug).
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/LDAPConnectionService.java