org.apache.solr.client.solrj.impl

## Class HttpSolrClient.Builder

- java.lang.Object
- - org.apache.solr.client.solrj.impl.HttpSolrClient.Builder

Enclosing class:
  HttpSolrClient

    public static class HttpSolrClient.Builder
    extends Object

Constructs `HttpSolrClient` instances from provided configuration.

### Constructor Summary

Constructors
Constructor and Description
`Builder(String baseSolrUrl)` Create a Builder object, based on the provided Solr URL.

### Method Summary

All Methods Instance Methods Concrete Methods
`HttpSolrClient.Builder` `allowCompression(boolean compression)` Chooses whether created `HttpSolrClient`s use compression by default.
`HttpSolrClient` `build()` Create a `HttpSolrClient` based on provided configuration.
`HttpSolrClient.Builder` `withDelegationToken(String delegationToken)` Use a delegation token for authenticating via the KerberosPlugin
`HttpSolrClient.Builder` `withHttpClient(org.apache.http.client.HttpClient httpClient)` Provides a `HttpClient` for the builder to use when creating clients.
`HttpSolrClient.Builder` `withResponseParser(ResponseParser responseParser)` Provides a `ResponseParser` for created clients to use when handling requests.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Builder

    public Builder(String baseSolrUrl)

Create a Builder object, based on the provided Solr URL. By default, compression is not enabled in created HttpSolrClient objects.

Parameters:
  `baseSolrUrl` - the base URL of the Solr server that will be targeted by any created clients.

### Method Detail

#### withHttpClient

    public HttpSolrClient.Builder withHttpClient(org.apache.http.client.HttpClient httpClient)

Provides a `HttpClient` for the builder to use when creating clients.

#### withResponseParser

    public HttpSolrClient.Builder withResponseParser(ResponseParser responseParser)

Provides a `ResponseParser` for created clients to use when handling requests.

#### allowCompression

    public HttpSolrClient.Builder allowCompression(boolean compression)

Chooses whether created `HttpSolrClient`s use compression by default.

#### withDelegationToken

    public HttpSolrClient.Builder withDelegationToken(String delegationToken)

Use a delegation token for authenticating via the KerberosPlugin

#### build

    public HttpSolrClient build()

Create a `HttpSolrClient` based on provided configuration.