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
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 Summary
ConstructorsModifierConstructorDescriptionprotectedHttpSolrClientFactory(org.apache.solr.client.solrj.SolrClient solrClient) HttpSolrClientFactory(org.apache.solr.client.solrj.SolrClient solrClient, org.apache.http.auth.Credentials credentials, String authPolicy) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()protected voiddestroy(org.apache.solr.client.solrj.SolrClient client) org.apache.solr.client.solrj.SolrClientGet baseSolrClientinstanceprotected final booleanisHttpSolrClient(org.apache.solr.client.solrj.SolrClient solrClient) voidsetSolrClient(org.apache.solr.client.solrj.SolrClient solrClient)
-
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:SolrClientFactoryGet baseSolrClientinstance- Specified by:
getSolrClientin interfaceSolrClientFactory- Returns:
- a reusable SolrClient instance
-
setSolrClient
public void setSolrClient(org.apache.solr.client.solrj.SolrClient solrClient) -
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
destroy
protected void destroy(org.apache.solr.client.solrj.SolrClient client) - Parameters:
client-
-