com.dominodatalab.client.DominoApiClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of domino-java-client Show documentation
Show all versions of domino-java-client Show documentation
Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.
package com.dominodatalab.client;
import java.net.http.HttpClient;
import java.time.Duration;
import com.dominodatalab.api.invoker.ApiClient;
import lombok.experimental.UtilityClass;
/**
* Utility class to construct an API client with some defaults.
*/
@UtilityClass
public class DominoApiClient extends DominoClient {
/**
* Create the API Client for accessing DataMiner over HTTP.
*
* @return the {@link ApiClient}
*/
public ApiClient createApiClient() {
final ApiClient client = new ApiClient();
client.setHttpClientBuilder(HttpClient.newBuilder().sslContext(TrustAllManager.createSslContext()));
client.setObjectMapper(createDefaultObjectMapper());
client.setConnectTimeout(Duration.ofSeconds(5));
client.setReadTimeout(Duration.ofSeconds(60));
return client;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy