private LdapNetworkConnection createLDAPConnection(LDAPConfiguration config)
            throws GuacamoleException {
        return createLDAPConnection(
                config.getServerHostname(),
                config.getServerPort(),
                config.getEncryptionMethod(),
                config.getSslProtocol(),
                config.getNetworkTimeout());
    }
Creates a new instance of LdapNetworkConnection, configured as required
to use whichever encryption method, hostname, and port are requested
within guacamole.properties. 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 config
    The configuration of the LDAP server being queried.

@return
    A new LdapNetworkConnection instance which has already been
    configured to use the encryption method, hostname, and port
    requested within guacamole.properties.

@throws GuacamoleException
    If an error occurs while parsing guacamole.properties, or 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