All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.algolia.search.ApacheAPIClientBuilder Maven / Gradle / Ivy

There is a newer version: 4.10.2
Show newest version
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