Package com.algolia
Class ApiClient
java.lang.Object
com.algolia.ApiClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
AbtestingClient
,AnalyticsClient
,IngestionClient
,InsightsClient
,MonitoringClient
,PersonalizationClient
,QuerySuggestionsClient
,RecommendClient
,SearchClient
,UsageClient
Represents a base client for making API requests. The client uses a
Requester
for
executing requests and an ExecutorService
for asynchronous operations. It is designed to
be extended by concrete API client implementations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected <T> CompletableFuture<T>
executeAsync
(HttpRequest httpRequest, RequestOptions requestOptions, com.fasterxml.jackson.core.type.TypeReference<T> returnType) Executes an HTTP request asynchronously and returns aCompletableFuture
of the response deserialized into a specified type.protected <T> CompletableFuture<T>
executeAsync
(HttpRequest httpRequest, RequestOptions requestOptions, Class<?> returnType, Class<?> innerType) Executes an HTTP request asynchronously and returns aCompletableFuture
of the response deserialized into a specified type.
-
Constructor Details
-
Method Details
-
executeAsync
protected <T> CompletableFuture<T> executeAsync(HttpRequest httpRequest, RequestOptions requestOptions, com.fasterxml.jackson.core.type.TypeReference<T> returnType) Executes an HTTP request asynchronously and returns aCompletableFuture
of the response deserialized into a specified type. -
executeAsync
protected <T> CompletableFuture<T> executeAsync(HttpRequest httpRequest, RequestOptions requestOptions, Class<?> returnType, Class<?> innerType) Executes an HTTP request asynchronously and returns aCompletableFuture
of the response deserialized into a specified type. -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-