public class Client extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private ClientConfiguration |
configuration |
private static com.fasterxml.jackson.databind.ObjectMapper |
CONTENT_OBJECT_MAPPER |
private static org.apache.http.impl.client.CloseableHttpClient |
httpClient |
private org.apache.http.HttpHost |
httpHost |
private static ConcurrentHashMap<String,org.apache.http.HttpHost> |
httpHostMap |
private static com.fasterxml.jackson.databind.ObjectMapper |
mapper |
private static int |
maxRetryNumber |
private static Signer |
signer |
| 构造器和说明 |
|---|
Client(ClientConfiguration configuration) |
| 限定符和类型 | 方法和说明 |
|---|---|
private org.apache.http.HttpHost |
createHttpHost(String host,
String port,
String scheme) |
<T extends ResponseModel> |
doAction(AbstractRequestModel<T> request) |
private <T> T |
getHttpContentObject(org.apache.http.HttpResponse response,
Class<T> clazz) |
private String |
getHttpContentString(org.apache.http.HttpResponse response) |
private <T extends ResponseModel> |
getMultipartEntityBuilder(AbstractRequestModel<T> request) |
<T extends ResponseModel> |
getResponseModel(AbstractRequestModel<T> request) |
private boolean |
isSuccess(org.apache.http.HttpResponse response) |
private OpenapiError |
readError(org.apache.http.HttpResponse response) |
private <T extends ResponseModel> |
readResponse(org.apache.http.HttpResponse response,
Class<T> clazz) |
private static final com.fasterxml.jackson.databind.ObjectMapper mapper
private static org.apache.http.impl.client.CloseableHttpClient httpClient
private org.apache.http.HttpHost httpHost
private static int maxRetryNumber
private ClientConfiguration configuration
private static Signer signer
private static final com.fasterxml.jackson.databind.ObjectMapper CONTENT_OBJECT_MAPPER
private static ConcurrentHashMap<String,org.apache.http.HttpHost> httpHostMap
public Client(ClientConfiguration configuration)
private org.apache.http.HttpHost createHttpHost(String host, String port, String scheme)
public <T extends ResponseModel> org.apache.http.HttpResponse doAction(AbstractRequestModel<T> request) throws ClientException
ClientExceptionprivate <T extends ResponseModel> org.apache.http.entity.mime.MultipartEntityBuilder getMultipartEntityBuilder(AbstractRequestModel<T> request) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic <T extends ResponseModel> T getResponseModel(AbstractRequestModel<T> request) throws ClientException, ServerException
private boolean isSuccess(org.apache.http.HttpResponse response)
private OpenapiError readError(org.apache.http.HttpResponse response) throws ClientException, ServerException
private <T extends ResponseModel> T readResponse(org.apache.http.HttpResponse response, Class<T> clazz) throws ClientException
ClientExceptionprivate String getHttpContentString(org.apache.http.HttpResponse response) throws IOException
IOExceptionprivate <T> T getHttpContentObject(org.apache.http.HttpResponse response,
Class<T> clazz)
throws IOException
IOExceptionCopyright © 2024. All rights reserved.