com.imperva.shcf4j.HttpClientCommonBuilder 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;
import com.imperva.shcf4j.client.CredentialsProvider;
import com.imperva.shcf4j.client.config.RequestConfig;
import com.imperva.shcf4j.conn.ssl.SSLSessionStrategy;
import javax.net.ssl.SSLException;
import java.util.function.Consumer;
/**
* HttpClientCommonBuilder
*
*
* A common methods for both {@link SyncHttpClientBuilder} and {@link AsyncHttpClientBuilder}
*
*
* @author maxim.kirilov
*/
public interface HttpClientCommonBuilder {
T setSSLSessionStrategy(final SSLSessionStrategy strategy) throws SSLException;
T setDefaultRequestConfig(final RequestConfig config);
T setProxy(HttpHost proxy);
T setDefaultCredentialsProvider(CredentialsProvider cp);
T addRequestInterceptor(Consumer interceptor);
}