Spring Data Solr

org.springframework.data.solr.server.support
Class HttpSolrServerFactory

java.lang.Object
  extended by org.springframework.data.solr.server.support.HttpSolrServerFactory
All Implemented Interfaces:
DisposableBean, SolrServerFactory
Direct Known Subclasses:
HttpSolrServerFactoryBean

public class HttpSolrServerFactory
extends Object

The HttpSolrServerFactory configures an HttpSolrServer to work with the provided core. If provided Credentials eg. (@link UsernamePasswordCredentials} and AuthPolicy (eg. BASIC, DIGEST,...) will be applied to the underlying HttpClient.

Author:
Christoph Strobl

Constructor Summary
protected HttpSolrServerFactory()
           
  HttpSolrServerFactory(org.apache.solr.client.solrj.SolrServer solrServer)
           
  HttpSolrServerFactory(org.apache.solr.client.solrj.SolrServer solrServer, String core)
           
  HttpSolrServerFactory(org.apache.solr.client.solrj.SolrServer solrServer, String core, org.apache.http.auth.Credentials credentials, String authPolicy)
           
 
Method Summary
protected  void appendCoreToBaseUrl(String core, org.apache.solr.client.solrj.SolrServer solrServer)
           
 void destroy()
           
protected  void destroy(org.apache.solr.client.solrj.SolrServer server)
           
 List<String> getCores()
          Get list of cores
 org.apache.solr.client.solrj.SolrServer getSolrServer()
          Get base SolrServer instance
 org.apache.solr.client.solrj.SolrServer getSolrServer(String core)
          returns the reference solrServer
protected  boolean isHttpSolrServer(org.apache.solr.client.solrj.SolrServer solrServer)
           
 void setSolrServer(org.apache.solr.client.solrj.SolrServer solrServer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpSolrServerFactory

protected HttpSolrServerFactory()

HttpSolrServerFactory

public HttpSolrServerFactory(org.apache.solr.client.solrj.SolrServer solrServer)

HttpSolrServerFactory

public HttpSolrServerFactory(org.apache.solr.client.solrj.SolrServer solrServer,
                             String core)

HttpSolrServerFactory

public HttpSolrServerFactory(org.apache.solr.client.solrj.SolrServer solrServer,
                             String core,
                             org.apache.http.auth.Credentials credentials,
                             String authPolicy)
Method Detail

getCores

public List<String> getCores()
Description copied from interface: SolrServerFactory
Get list of cores

Returns:
empty list if no cores defined

getSolrServer

public org.apache.solr.client.solrj.SolrServer getSolrServer(String core)
returns the reference solrServer

Returns:
See Also:
SolrServerFactory.getSolrServer()

appendCoreToBaseUrl

protected void appendCoreToBaseUrl(String core,
                                   org.apache.solr.client.solrj.SolrServer solrServer)

isHttpSolrServer

protected final boolean isHttpSolrServer(org.apache.solr.client.solrj.SolrServer solrServer)

getSolrServer

public org.apache.solr.client.solrj.SolrServer getSolrServer()
Description copied from interface: SolrServerFactory
Get base SolrServer instance

Specified by:
getSolrServer in interface SolrServerFactory
Returns:
a reusable solrServer instance

setSolrServer

public void setSolrServer(org.apache.solr.client.solrj.SolrServer solrServer)

destroy

public void destroy()
Specified by:
destroy in interface DisposableBean

destroy

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

Spring Data Solr

Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.