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 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 setObjectMapper(@Nonnull ObjectMapper objectMapper) {
super.setObjectMapper(objectMapper);
return this;
}
@Override
protected APIClient build(@Nonnull APIClientConfiguration configuration) {
return new APIClient(new ApacheHttpClient(configuration), configuration);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy