public class PreemptiveBasicAuthClientBuilderFactory extends Object implements HttpClientBuilderFactory
Modifier and Type | Field and Description |
---|---|
static String |
SYS_PROP_BASIC_AUTH_CREDENTIALS
A system property to configure the Basic auth credentials via a java system property.
|
static String |
SYS_PROP_HTTP_CLIENT_CONFIG
A system property used to specify a properties file containing default parameters used for
creating a HTTP client.
|
Constructor and Description |
---|
PreemptiveBasicAuthClientBuilderFactory() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
SolrHttpClientBuilder |
getHttpClientBuilder(Optional<SolrHttpClientBuilder> builder)
This method configures the SolrHttpClientBuilder by overriding the
configuration of passed SolrHttpClientBuilder or as a new instance.
|
static void |
setDefaultSolrParams(SolrParams params)
This method enables configuring system wide defaults (apart from using a config file based approach).
|
public static final String SYS_PROP_HTTP_CLIENT_CONFIG
public static final String SYS_PROP_BASIC_AUTH_CREDENTIALS
public PreemptiveBasicAuthClientBuilderFactory()
public static void setDefaultSolrParams(SolrParams params)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public SolrHttpClientBuilder getHttpClientBuilder(Optional<SolrHttpClientBuilder> builder)
HttpClientBuilderFactory
getHttpClientBuilder
in interface HttpClientBuilderFactory
builder
- The instance of the SolrHttpClientBuilder which should
by configured (optional).Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.