public interface ElasticsearchHttpClientConfigurer
This enables in particular connecting to cloud services that require a particular authentication method, such as request signing on Amazon Web Services. The ElasticsearchHttpClientConfigurer implementation will be given access to the HTTP client builder on startup. Note that you don't have to configure the client unless you have specific needs: the default configuration should work just fine for an on-premises Elasticsearch server.
Modifier and Type | Method and Description |
---|---|
void |
configure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder builder,
Properties properties)
Configure the HTTP Client.
|
void configure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder builder, Properties properties)
This method is called once for every configurer, each time an Elasticsearch client is set up.
Implementors should take care of only applying configuration if relevant:
there may be multiple, conflicting configurers in the path, so implementors should first check
(through a configuration property) whether they are needed or not before applying any modification.
For example an authentication configurer could decide not to do anything if no username is provided,
or if the configuration property my.configurer.enabled
is false
.
builder
- An Apache HTTP client builder, to set the configuration to be applied.properties
- The properties set for the Elasticsearch service being configured.
Properties are masked, i.e. hibernate.search.default.elasticsearch.my.property
will be accessed as simply my.property
.Copyright © 2006-2018 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.