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

com.payneteasy.grpc.longpolling.client.util.ConnectionOptions Maven / Gradle / Ivy

There is a newer version: 1.0-9
Show newest version
package com.payneteasy.grpc.longpolling.client.util;

import java.net.HttpURLConnection;
import java.net.URL;

public class ConnectionOptions {

    private final long connectionTimeout;
    private final long readTimeout;
    private final URL  baseUrl;

    public ConnectionOptions(URL aBaseUrl, long connectionTimeout, long readTimeout) {
        this.connectionTimeout = connectionTimeout;
        this.readTimeout = readTimeout;
        baseUrl = aBaseUrl;
    }

    public URL getBaseUrl() {
        return baseUrl;
    }

    public void configure(HttpURLConnection aConnection) {
        aConnection.setConnectTimeout((int) connectionTimeout);
        aConnection.setReadTimeout((int) readTimeout);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy