Class HttpClientFactory
- java.lang.Object
-
- com.foxinmy.weixin4j.http.factory.HttpClientFactory
-
- Direct Known Subclasses:
HttpComponent3Factory
,HttpComponent4_1Factory
,HttpComponent4_2Factory
,HttpComponent4Factory
,Netty4HttpClientFactory
,OkHttpClient2Factory
,OkHttpClient3Factory
,OkHttpClientFactory
,SimpleHttpClientFactory
public abstract class HttpClientFactory extends Object
HttpClient工厂生产类:参考netty的InternalLoggerFactory- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpClientFactory.AllowHostnameVerifier
static class
HttpClientFactory.AllowX509TrustManager
-
Constructor Summary
Constructors Constructor Description HttpClientFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SSLContext
allowSSLContext()
static HttpClientFactory
getDefaultFactory()
获取默认的HttpClientstatic HttpParams
getDefaultParams()
获取默认的HttpParamsstatic HttpClient
getInstance()
获取HttpClient实例static HttpClient
getInstance(HttpParams params)
获取HttpClient实例abstract HttpClient
newInstance(HttpParams params)
获取HttpClient实例static void
setDefaultFactory(HttpClientFactory defaultFactory)
显式设置默认的HttpClientstatic void
setDefaultParams(HttpParams params)
Resolve the Http Parameter
-
-
-
Method Detail
-
getDefaultFactory
public static HttpClientFactory getDefaultFactory()
获取默认的HttpClient- Returns:
-
setDefaultFactory
public static void setDefaultFactory(HttpClientFactory defaultFactory)
显式设置默认的HttpClient- Parameters:
defaultFactory
-
-
getDefaultParams
public static HttpParams getDefaultParams()
获取默认的HttpParams- Returns:
-
setDefaultParams
public static void setDefaultParams(HttpParams params)
Resolve the Http Parameter- Parameters:
params
- 请求参数
-
getInstance
public static HttpClient getInstance()
获取HttpClient实例- Returns:
-
getInstance
public static HttpClient getInstance(HttpParams params)
获取HttpClient实例- Parameters:
params
- Http参数- Returns:
- HttpClinet实例
-
newInstance
public abstract HttpClient newInstance(HttpParams params)
获取HttpClient实例- Parameters:
params
- http参数 可为空- Returns:
-
allowSSLContext
public static SSLContext allowSSLContext()
-
-