org.apache.solr.client.solrj.impl

## Class SolrClientBuilder<B extends SolrClientBuilder<B>>

- java.lang.Object
- - org.apache.solr.client.solrj.impl.SolrClientBuilder<B>

Direct Known Subclasses:
  CloudSolrClient.Builder, ConcurrentUpdateSolrClient.Builder, HttpSolrClient.Builder, LBHttpSolrClient.Builder

    public abstract class SolrClientBuilder<B extends SolrClientBuilder<B>>
    extends Object

### Field Summary

Fields
`protected Integer` `connectionTimeoutMillis`
`protected org.apache.http.client.HttpClient` `httpClient`
`protected ResponseParser` `responseParser`
`protected Integer` `socketTimeoutMillis`

### Constructor Summary

Constructors
Constructor and Description
`SolrClientBuilder()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract B` `getThis()` The solution for the unchecked cast warning.
`B` `withConnectionTimeout(int connectionTimeoutMillis)` Tells `HttpSolrClient.Builder` that created clients should obey the following timeout when connecting to Solr servers.
`B` `withHttpClient(org.apache.http.client.HttpClient httpClient)` Provides a `HttpClient` for the builder to use when creating clients.
`B` `withResponseParser(ResponseParser responseParser)` Provides a `ResponseParser` for created clients to use when handling requests.
`B` `withSocketTimeout(int socketTimeoutMillis)` Tells `HttpSolrClient.Builder` that created clients should set the following read timeout on all sockets.

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

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

### Field Detail

#### httpClient

    protected org.apache.http.client.HttpClient httpClient

#### responseParser

    protected ResponseParser responseParser

#### connectionTimeoutMillis

    protected Integer connectionTimeoutMillis

#### socketTimeoutMillis

    protected Integer socketTimeoutMillis

### Constructor Detail

#### SolrClientBuilder

    public SolrClientBuilder()

### Method Detail

#### getThis

    public abstract B getThis()

The solution for the unchecked cast warning.

#### withHttpClient

    public B withHttpClient(org.apache.http.client.HttpClient httpClient)

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

#### withResponseParser

    public B withResponseParser(ResponseParser responseParser)

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

#### withConnectionTimeout

    public B withConnectionTimeout(int connectionTimeoutMillis)

Tells `HttpSolrClient.Builder` that created clients should obey the following timeout when connecting to Solr servers.

#### withSocketTimeout

    public B withSocketTimeout(int socketTimeoutMillis)

Tells `HttpSolrClient.Builder` that created clients should set the following read timeout on all sockets.