Class HttpSolrClientFactory

java.lang.Object
org.springframework.data.solr.server.support.HttpSolrClientFactory
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, SolrClientFactory
Direct Known Subclasses:
HttpSolrClientFactoryBean

public class HttpSolrClientFactory extends Object
The HttpSolrClientFactory replaces HttpSolrServerFactory from version 1.x and configures an HttpSolrClient to work with the provided core. If provided Credentials eg. (@link UsernamePasswordCredentials} and AuthPolicy (eg. BASIC, DIGEST,...) will be applied to the underlying HttpClient.
Since:
2.0
  • Constructor Details

    • HttpSolrClientFactory

      protected HttpSolrClientFactory()
    • HttpSolrClientFactory

      public HttpSolrClientFactory(org.apache.solr.client.solrj.SolrClient solrClient)
    • HttpSolrClientFactory

      public HttpSolrClientFactory(org.apache.solr.client.solrj.SolrClient solrClient, @Nullable org.apache.http.auth.Credentials credentials, @Nullable String authPolicy)
  • Method Details

    • isHttpSolrClient

      protected final boolean isHttpSolrClient(org.apache.solr.client.solrj.SolrClient solrClient)
    • getSolrClient

      public org.apache.solr.client.solrj.SolrClient getSolrClient()
      Description copied from interface: SolrClientFactory
      Get base SolrClient instance
      Specified by:
      getSolrClient in interface SolrClientFactory
      Returns:
      a reusable SolrClient instance
    • setSolrClient

      public void setSolrClient(org.apache.solr.client.solrj.SolrClient solrClient)
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
    • destroy

      protected void destroy(org.apache.solr.client.solrj.SolrClient client)
      Parameters:
      client -