Package com.loop54.http
Interface IRequestManager
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
RequestManager
Handles the HTTP request to the Loop54 API.
-
Method Summary
Modifier and TypeMethodDescription<T extends Response>
CompletableFuture<T>callEngineAsync(String action, Request requestData, UserMetaData metaData, Class<T> responseType) Calls the loop54 search engine and returns a deserialized response object.
-
Method Details
-
callEngineAsync
<T extends Response> CompletableFuture<T> callEngineAsync(String action, Request requestData, UserMetaData metaData, Class<T> responseType) Calls the loop54 search engine and returns a deserialized response object.- Type Parameters:
T- The expected response type. E.g. if making a search call the expected type would beSearchResponse- Parameters:
action- The type of request. This will translate into the resource on the actual HTTP request i.e. "endpoint/action". Must not be null.requestData- The query data to send to the engine. Must not be null.metaData- Data about the requesting user. Must not be null.responseType- The expected response type. E.g. if making a search call the expected type would beSearchResponse- Returns:
- The deserialized response.
-