org.hibernate.search.backend.elasticsearch.client.ElasticsearchHttpClientConfigurationContext Maven / Gradle / Ivy
/*
 * Hibernate Search, full-text search for your domain model
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.search.backend.elasticsearch.client;
import java.util.Optional;
import org.hibernate.search.backend.elasticsearch.ElasticsearchVersion;
import org.hibernate.search.engine.cfg.ConfigurationPropertySource;
import org.hibernate.search.engine.environment.bean.BeanResolver;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
/**
 * The context passed to {@link ElasticsearchHttpClientConfigurer}.
 */
public interface ElasticsearchHttpClientConfigurationContext {
	/**
	 * @return A {@link BeanResolver}.
	 */
	BeanResolver beanResolver();
	/**
	 * @return A configuration property source, appropriately masked so that the factory
	 * doesn't need to care about Hibernate Search prefixes (hibernate.search.*, etc.). All the properties
	 * can be accessed at the root.
	 * CAUTION: the property key "type" is reserved for use by the engine.
	 */
	ConfigurationPropertySource configurationPropertySource();
	/**
	 * @return An Apache HTTP client builder, to set the configuration.
	 * @see the Apache HTTP Client documentation
	 */
	HttpAsyncClientBuilder clientBuilder();
	/**
	 * @return The version of Elasticsearch/OpenSearch configured on the backend.
	 * May be empty if not configured explicitly (in which case it will only be known after the client is built).
	 */
	Optional configuredVersion();
}
      © 2015 - 2025 Weber Informatics LLC | Privacy Policy