public abstract class ServiceClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ServiceClient.Request
Wrapper class based on
HttpMessage that represents HTTP request
message to OSS. |
| Modifier and Type | Field and Description |
|---|---|
protected ClientConfiguration |
config |
| Modifier | Constructor and Description |
|---|---|
protected |
ServiceClient(ClientConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
ClientConfiguration |
getClientConfiguration() |
String |
getConnectionPoolStats() |
protected abstract RetryStrategy |
getDefaultRetryStrategy() |
ResponseMessage |
sendRequest(RequestMessage request,
ExecutionContext context)
Send HTTP request with specified context to OSS and wait for HTTP
response.
|
protected abstract ResponseMessage |
sendRequestCore(ServiceClient.Request request,
ExecutionContext context)
Implements the core logic to send requests to Aliyun OSS services.
|
abstract void |
shutdown() |
protected ClientConfiguration config
protected ServiceClient(ClientConfiguration config)
public ClientConfiguration getClientConfiguration()
public ResponseMessage sendRequest(RequestMessage request, ExecutionContext context) throws ServiceException, ClientException
request - a request message.context - http request context.ResponseMessage instance.ClientException - If any errors are encountered in the client while making the
request or handling the response.ServiceException - The base exception class to represent any expected or unexpected OSS
server side errors.protected abstract ResponseMessage sendRequestCore(ServiceClient.Request request, ExecutionContext context) throws IOException
request - a request message.context - http request context.ResponseMessage instance.IOException - An IO errors are encountered in the client while making the
request or handling the response.protected abstract RetryStrategy getDefaultRetryStrategy()
public abstract void shutdown()
public String getConnectionPoolStats()
Copyright © 2023. All Rights Reserved.