com.algolia.search.ApacheAPIClientBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of algoliasearch Show documentation
Show all versions of algoliasearch Show documentation
Java client for Algolia Search API
package com.algolia.search;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.List;
import javax.annotation.Nonnull;
public final class ApacheAPIClientBuilder extends APIClientBuilder {
public ApacheAPIClientBuilder(@Nonnull String applicationId, @Nonnull String apiKey) {
super(applicationId, apiKey);
}
@Override
public ApacheAPIClientBuilder setUserAgent(
@Nonnull String customAgent, @Nonnull String customAgentVersion) {
super.setUserAgent(customAgent, customAgentVersion);
return this;
}
@Override
public ApacheAPIClientBuilder setExtraHeader(@Nonnull String key, String value) {
super.setExtraHeader(key, value);
return this;
}
@Override
public ApacheAPIClientBuilder setConnectTimeout(int connectTimeout) {
super.setConnectTimeout(connectTimeout);
return this;
}
@Override
public ApacheAPIClientBuilder setReadTimeout(int readTimeout) {
super.setReadTimeout(readTimeout);
return this;
}
@Override
public ApacheAPIClientBuilder setHostDownTimeout(int hostDownTimeout) {
super.setHostDownTimeout(hostDownTimeout);
return this;
}
@Override
public ApacheAPIClientBuilder setObjectMapper(@Nonnull ObjectMapper objectMapper) {
super.setObjectMapper(objectMapper);
return this;
}
@Override
public ApacheAPIClientBuilder setQueryHosts(List queryHosts) {
super.setQueryHosts(queryHosts);
return this;
}
@Override
public ApacheAPIClientBuilder setBuildHosts(List buildHosts) {
super.setBuildHosts(buildHosts);
return this;
}
@Override
public ApacheAPIClientBuilder setMaxConnTotal(int maxConnTotal) {
super.setMaxConnTotal(maxConnTotal);
return this;
}
@Override
protected APIClient build(@Nonnull APIClientConfiguration configuration) {
return new APIClient(new ApacheHttpClient(configuration), configuration);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy