@SuppressWarnings({"UnusedDeclaration"})
    public void setContextFactory(LdapContextFactory contextFactory) {
        this.contextFactory = contextFactory;
    }
Sets the LdapContextFactory instance used to acquire connections to the LDAP directory during authentication
attempts and authorization queries.  Unless specified otherwise, the default is a {@link JndiLdapContextFactory}
instance.

@param contextFactory the LdapContextFactory instance used to acquire connections to the LDAP directory during
                      authentication attempts and authorization queries
core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapRealm.java