org.hibernate.search.elasticsearch.client.spi

## Interface ElasticsearchHttpClientConfigurer

- All Known Implementing Classes:
    AWSElasticsearchHttpClientConfigurer

      public interface ElasticsearchHttpClientConfigurer

  An extension point allowing fine tuning of the Apache HTTP Client used by the Elasticsearch integration.

  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.

  Author:
    Yoann Rodiere
  Experimental
    This contract is currently under active development and may be altered in any maintenance release

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder builder, Properties properties)` Configure the HTTP Client.

- - ### Method Detail

    - #### configure

          void configure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder builder,
                         Properties properties)

      Configure the HTTP Client.

      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`.

      Parameters:
        `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`.
      See Also:
        the Apache HTTP Client documentation

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved