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, sendRequest
protected 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
ServiceClient
sendRequestCore
in class ServiceClient
IOException
protected static ResponseMessage buildResponse(ServiceClient.Request request, org.apache.http.client.methods.CloseableHttpResponse httpResponse) throws IOException
IOException
protected RetryStrategy getDefaultRetryStrategy()
getDefaultRetryStrategy
in class ServiceClient
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()
public void shutdown()
shutdown
in class ServiceClient
public String getConnectionPoolStats()
getConnectionPoolStats
in class ServiceClient
protected static String resolveStringValue(String value, String key, boolean flag)
protected static int resolveIntValue(int value, String key, boolean flag)
Copyright © 2021. All Rights Reserved.