All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dominodatalab.client.DominoApiClient Maven / Gradle / Ivy

Go to download

Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.

There is a newer version: 6.0.1.0
Show newest version
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