com.imperva.shcf4j.client.config.RequestConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shcf4j-api Show documentation
Show all versions of shcf4j-api Show documentation
The Simple HTTP Client Facade for Java (SHCF4J) serves as a simple facade or abstraction for various HTTP client frameworks (e.g. java.net.HttpURLConnection, Apache HttpClient, etc.) allowing the end user to plug in the desired HTTP client framework at deployment time.
The newest version!
package com.imperva.shcf4j.client.config;
import com.imperva.shcf4j.HttpHost;
import lombok.Builder;
import lombok.Singular;
import lombok.Value;
import java.net.InetAddress;
import java.util.Collection;
/**
* RequestConfig
*
*
* Holds configuration parameters for HTTP request.
*
*
* @author maxim.kirilov
*/
@Builder(toBuilder = true)
@Value
public final class RequestConfig {
@Builder.Default
private final boolean expectContinueEnabled = false;
private final HttpHost proxy;
private final InetAddress localAddress;
@Builder.Default
private final CookieSpecs cookieSpec = CookieSpecs.STANDARD_RFC_6265;
@Builder.Default
private final boolean redirectsEnabled = true;
private final boolean relativeRedirectsAllowed;
private final boolean circularRedirectsAllowed;
private final int maxRedirects;
private final boolean authenticationEnabled;
@Singular("targetPreferredAuthScheme")
private final Collection targetPreferredAuthSchemes;
@Singular("proxyPreferredAuthScheme")
private final Collection proxyPreferredAuthSchemes;
@Builder.Default
private final int connectionRequestTimeoutMilliseconds = -1;
@Builder.Default
private final int connectTimeoutMilliseconds = -1;
@Builder.Default
private final int socketTimeoutMilliseconds = -1;
}