public class ApiClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ApiClient.Builder |
| Constructor and Description |
|---|
ApiClient() |
ApiClient(DatabricksConfig config) |
ApiClient(DatabricksConfig config,
Timer timer) |
| Modifier and Type | Method and Description |
|---|---|
String |
configuredAccountID() |
<T> T |
deserialize(InputStream body,
com.fasterxml.jackson.databind.JavaType target) |
<T> T |
deserialize(Response response,
Class<T> target) |
<T> void |
deserialize(Response response,
T object) |
<T> T |
execute(Request in,
Class<T> target)
Executes HTTP request with retries and converts it to proper POJO.
|
<T> T |
execute(Request in,
Class<T> target,
RequestOptions options)
Executes HTTP request with retries and converts it to proper POJO, using custom request
options.
|
static Optional<Long> |
getBackoffFromRetryAfterHeader(Response response) |
long |
getBackoffMillis(Response response,
int attemptNumber) |
<O> Collection<O> |
getCollection(Request req,
Class<O> element) |
HttpClient |
getHttpClient() |
Map<String,String> |
getStringMap(Request req) |
String |
serialize(Object body) |
static <I> void |
setQuery(Request in,
I entity) |
protected <I,O> O |
withJavaType(Request request,
com.fasterxml.jackson.databind.JavaType javaType) |
public ApiClient()
public ApiClient(DatabricksConfig config)
public ApiClient(DatabricksConfig config, Timer timer)
public String configuredAccountID()
public static <I> void setQuery(Request in, I entity)
public <O> Collection<O> getCollection(Request req, Class<O> element)
protected <I,O> O withJavaType(Request request, com.fasterxml.jackson.databind.JavaType javaType)
public <T> T execute(Request in, Class<T> target) throws IOException
in - Commons HTTP requesttarget - Expected pojo typeIOExceptionpublic <T> T execute(Request in, Class<T> target, RequestOptions options) throws IOException
in - Commons HTTP requesttarget - Expected pojo typeoptions - Optional request options to customize request behaviorIOExceptionpublic long getBackoffMillis(Response response, int attemptNumber)
public static Optional<Long> getBackoffFromRetryAfterHeader(Response response)
public <T> T deserialize(Response response, Class<T> target) throws IOException
IOExceptionpublic <T> T deserialize(InputStream body, com.fasterxml.jackson.databind.JavaType target) throws IOException
IOExceptionpublic <T> void deserialize(Response response, T object) throws IOException
IOExceptionpublic String serialize(Object body) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic HttpClient getHttpClient()
Copyright © 2025. All rights reserved.