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

com.launchkey.sdk.http.HttpClientFactory Maven / Gradle / Ivy

Go to download

SDK for interacting with the LaunchKey distributed authentication and authorization platform

There is a newer version: 4.0.0
Show newest version
package com.launchkey.sdk.http;

import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.HttpClientBuilder;

public class HttpClientFactory {
    private Integer maxConnections;

    public HttpClient createClient() {
        HttpClientBuilder builder = HttpClientBuilder.create();
        if (maxConnections != null) {
            builder.setMaxConnPerRoute(maxConnections);
        }

        return builder.build();
    }

    public int getMaxConnections() {
        return maxConnections;
    }

    public void setMaxConnections(int maxConnections) {
        this.maxConnections = maxConnections;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy