public class DefaultServiceClient extends ServiceClient
ServiceClient.ServiceClient.Request| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.client.AuthCache |
authCache |
protected org.apache.http.conn.HttpClientConnectionManager |
connectionManager |
protected org.apache.http.client.CredentialsProvider |
credentialsProvider |
protected org.apache.http.impl.client.CloseableHttpClient |
httpClient |
protected static com.aliyun.oss.common.comm.HttpRequestFactory |
httpRequestFactory |
protected org.apache.http.HttpHost |
proxyHttpHost |
protected org.apache.http.client.config.RequestConfig |
requestConfig |
config| Constructor and Description |
|---|
DefaultServiceClient(ClientConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
protected static ResponseMessage |
buildResponse(ServiceClient.Request request,
org.apache.http.client.methods.CloseableHttpResponse httpResponse) |
protected org.apache.http.impl.client.CloseableHttpClient |
createHttpClient(org.apache.http.conn.HttpClientConnectionManager connectionManager) |
protected org.apache.http.conn.HttpClientConnectionManager |
createHttpClientConnectionManager() |
protected org.apache.http.client.protocol.HttpClientContext |
createHttpContext() |
String |
getConnectionPoolStats() |
protected RetryStrategy |
getDefaultRetryStrategy() |
protected static int |
resolveIntValue(int value,
String key,
boolean flag) |
protected static String |
resolveStringValue(String value,
String key,
boolean flag) |
ResponseMessage |
sendRequestCore(ServiceClient.Request request,
ExecutionContext context)
Implements the core logic to send requests to Aliyun OSS services.
|
void |
shutdown() |
getClientConfiguration, sendRequestprotected static com.aliyun.oss.common.comm.HttpRequestFactory httpRequestFactory
protected org.apache.http.impl.client.CloseableHttpClient httpClient
protected org.apache.http.conn.HttpClientConnectionManager connectionManager
protected org.apache.http.client.config.RequestConfig requestConfig
protected org.apache.http.client.CredentialsProvider credentialsProvider
protected org.apache.http.HttpHost proxyHttpHost
protected org.apache.http.client.AuthCache authCache
public DefaultServiceClient(ClientConfiguration config)
public ResponseMessage sendRequestCore(ServiceClient.Request request, ExecutionContext context) throws IOException
ServiceClientsendRequestCore in class ServiceClientIOExceptionprotected static ResponseMessage buildResponse(ServiceClient.Request request, org.apache.http.client.methods.CloseableHttpResponse httpResponse) throws IOException
IOExceptionprotected RetryStrategy getDefaultRetryStrategy()
getDefaultRetryStrategy in class ServiceClientprotected org.apache.http.impl.client.CloseableHttpClient createHttpClient(org.apache.http.conn.HttpClientConnectionManager connectionManager)
protected org.apache.http.conn.HttpClientConnectionManager createHttpClientConnectionManager()
protected org.apache.http.client.protocol.HttpClientContext createHttpContext()
public void shutdown()
shutdown in class ServiceClientpublic String getConnectionPoolStats()
getConnectionPoolStats in class ServiceClientprotected static String resolveStringValue(String value, String key, boolean flag)
protected static int resolveIntValue(int value,
String key,
boolean flag)
Copyright © 2021. All Rights Reserved.