public class LocalHttpClient extends Object
| 构造器和说明 |
|---|
LocalHttpClient() |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.apache.http.client.methods.CloseableHttpResponse |
execute(org.apache.http.client.methods.HttpUriRequest request) |
static <T> T |
execute(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.client.ResponseHandler<T> responseHandler) |
static <T> T |
executeJsonResult(org.apache.http.client.methods.HttpUriRequest request,
Class<T> clazz)
数据返回自动JSON对象解析
|
static <T> T |
executeXmlResult(org.apache.http.client.methods.HttpUriRequest request,
Class<T> clazz)
数据返回自动XML对象解析
|
static <T> T |
executeXmlResult(org.apache.http.client.methods.HttpUriRequest request,
Class<T> clazz,
String sign_type,
String key)
数据返回自动XML对象解析
|
static void |
init(int maxTotal,
int maxPerRoute) |
static void |
initMchKeyStore(String mch_id,
InputStream inputStream)
初始化 MCH HttpClient KeyStore
|
static void |
initMchKeyStore(String mch_id,
String keyStoreFilePath)
初始化 MCH HttpClient KeyStore
|
static <T> T |
keyStoreExecuteXmlResult(String mch_id,
org.apache.http.client.methods.HttpUriRequest request,
Class<T> clazz)
MCH keyStore 请求 数据返回自动XML对象解析
|
static <T> T |
keyStoreExecuteXmlResult(String mch_id,
org.apache.http.client.methods.HttpUriRequest request,
Class<T> clazz,
String sign_type,
String key) |
static void |
setResultErrorHandler(ResultErrorHandler resultErrorHandler) |
static void |
setRetryExecutionCount(int retryExecutionCount) |
static void |
setTimeout(int timeout) |
public static void setTimeout(int timeout)
timeout - timeoutpublic static void setRetryExecutionCount(int retryExecutionCount)
retryExecutionCount - retryExecutionCountpublic static void setResultErrorHandler(ResultErrorHandler resultErrorHandler)
resultErrorHandler - 数据返回错误处理public static void init(int maxTotal,
int maxPerRoute)
maxTotal - maxTotalmaxPerRoute - maxPerRoutepublic static void initMchKeyStore(String mch_id, String keyStoreFilePath)
mch_id - mch_idkeyStoreFilePath - keyStoreFilePathpublic static void initMchKeyStore(String mch_id, InputStream inputStream)
mch_id - mch_idinputStream - p12 文件流public static org.apache.http.client.methods.CloseableHttpResponse execute(org.apache.http.client.methods.HttpUriRequest request)
public static <T> T execute(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.client.ResponseHandler<T> responseHandler)
public static <T> T executeJsonResult(org.apache.http.client.methods.HttpUriRequest request,
Class<T> clazz)
request - requestclazz - clazzpublic static <T> T executeXmlResult(org.apache.http.client.methods.HttpUriRequest request,
Class<T> clazz)
request - requestclazz - clazzpublic static <T> T executeXmlResult(org.apache.http.client.methods.HttpUriRequest request,
Class<T> clazz,
String sign_type,
String key)
request - requestclazz - clazzsign_type - 数据返回验证签名类型key - 数据返回验证签名keypublic static <T> T keyStoreExecuteXmlResult(String mch_id, org.apache.http.client.methods.HttpUriRequest request, Class<T> clazz)
mch_id - mch_idrequest - requestclazz - clazzpublic static <T> T keyStoreExecuteXmlResult(String mch_id, org.apache.http.client.methods.HttpUriRequest request, Class<T> clazz, String sign_type, String key)
mch_id - mch_idrequest - requestclazz - clazzsign_type - 数据返回验证签名类型key - 数据返回验证签名keyCopyright © 2017. All rights reserved.