Class Krb5HttpClientBuilder
- java.lang.Object
-
- org.apache.solr.client.solrj.impl.Krb5HttpClientBuilder
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,HttpClientBuilderFactory
public class Krb5HttpClientBuilder extends Object implements HttpClientBuilderFactory
Kerberos-enabled SolrHttpClientBuilder
-
-
Field Summary
Fields Modifier and Type Field Description static String
LOGIN_CONFIG_PROP
-
Constructor Summary
Constructors Constructor Description Krb5HttpClientBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
SolrHttpClientBuilder
getBuilder()
SolrHttpClientBuilder
getBuilder(SolrHttpClientBuilder builder)
SolrHttpClientBuilder
getHttpClientBuilder(Optional<SolrHttpClientBuilder> builder)
This method configures the SolrHttpClientBuilder by overriding the configuration of passed SolrHttpClientBuilder or as a new instance.static void
regenerateJaasConfiguration()
The jaasConfig is static, which makes it problematic for testing in the same jvm.void
setup(Http2SolrClient http2Client)
-
-
-
Field Detail
-
LOGIN_CONFIG_PROP
public static final String LOGIN_CONFIG_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
regenerateJaasConfiguration
public static void regenerateJaasConfiguration()
The jaasConfig is static, which makes it problematic for testing in the same jvm. Call this function to regenerate the static config (this is not thread safe). Note: only used for tests
-
getBuilder
public SolrHttpClientBuilder getBuilder()
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getHttpClientBuilder
public SolrHttpClientBuilder getHttpClientBuilder(Optional<SolrHttpClientBuilder> builder)
Description copied from interface:HttpClientBuilderFactory
This method configures the SolrHttpClientBuilder by overriding the configuration of passed SolrHttpClientBuilder or as a new instance.- Specified by:
getHttpClientBuilder
in interfaceHttpClientBuilderFactory
- Parameters:
builder
- The instance of the SolrHttpClientBuilder which should by configured (optional).- Returns:
- the SolrHttpClientBuilder
-
setup
public void setup(Http2SolrClient http2Client)
- Specified by:
setup
in interfaceHttpClientBuilderFactory
-
getBuilder
public SolrHttpClientBuilder getBuilder(SolrHttpClientBuilder builder)
-
-