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> optionalBuilder)
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).
|
void |
setup(Http2SolrClient client) |
void |
setup(Http2SolrClient client,
String basicAuthUser,
String basicAuthPass) |
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 void setup(Http2SolrClient client)
setup
in interface HttpClientBuilderFactory
public void setup(Http2SolrClient client, String basicAuthUser, String basicAuthPass)
public SolrHttpClientBuilder getHttpClientBuilder(Optional<SolrHttpClientBuilder> optionalBuilder)
HttpClientBuilderFactory
getHttpClientBuilder
in interface HttpClientBuilderFactory
optionalBuilder
- The instance of the SolrHttpClientBuilder which should
by configured (optional).Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.