com.launchkey.sdk.http.HttpClientFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of launchkey-sdk Show documentation
Show all versions of launchkey-sdk Show documentation
SDK for interacting with the LaunchKey distributed authentication and authorization platform
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;
}
}