Class HttpSolrClientFactoryBean

java.lang.Object
org.springframework.data.solr.server.support.HttpSolrClientFactory
org.springframework.data.solr.server.support.HttpSolrClientFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.apache.solr.client.solrj.SolrClient>, org.springframework.beans.factory.InitializingBean, SolrClientFactory

public class HttpSolrClientFactoryBean extends HttpSolrClientFactory implements org.springframework.beans.factory.FactoryBean<org.apache.solr.client.solrj.SolrClient>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
HttpSolrClientFactoryBean replaces HttpSolrServerFactoryBean from version 1.x.
Since:
2.0
  • Constructor Details

    • HttpSolrClientFactoryBean

      public HttpSolrClientFactoryBean()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • getObject

      public org.apache.solr.client.solrj.SolrClient getObject() throws Exception
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<org.apache.solr.client.solrj.SolrClient>
      Throws:
      Exception
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<org.apache.solr.client.solrj.SolrClient>
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<org.apache.solr.client.solrj.SolrClient>
    • setUrl

      public void setUrl(String url)
    • setTimeout

      public void setTimeout(Integer timeout)
    • setMaxConnections

      public void setMaxConnections(Integer maxConnections)
    • 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 -