com.algolia.config.Requester 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
The newest version!
package com.algolia.config;
import com.fasterxml.jackson.core.type.TypeReference;
import java.io.Closeable;
/**
* Represents a mechanism for executing HTTP requests and deserializing responses. It provides
* methods for making requests and returning the desired object representation. Implementations of
* this interface should ensure proper resource management.
*/
public interface Requester extends Closeable {
/**
* Executes an HTTP request and deserializes the response into a specified Java type.
*
* @param The type of the returned object.
* @param httpRequest The HTTP request to be executed.
* @param requestOptions Optional request options.
* @param returnType The class of the response.
* @param innerType The inner class type if the response is a container type.
* @return The deserialized response.
*/
T execute(HttpRequest httpRequest, RequestOptions requestOptions, Class> returnType, Class> innerType);
/**
* Executes an HTTP request and deserializes the response into a specified type reference.
*
* @param The type of the returned object.
* @param httpRequest The HTTP request to be executed.
* @param requestOptions Optional request options.
* @param returnType The type reference of the response.
* @return The deserialized response.
*/
T execute(HttpRequest httpRequest, RequestOptions requestOptions, TypeReference> returnType);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy