public abstract class ServiceClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ServiceClient.Request
A wrapper class to HttpMessage.
|
| Modifier and Type | Field and Description |
|---|---|
protected ClientConfiguration |
config |
| Modifier | Constructor and Description |
|---|---|
protected |
ServiceClient(ClientConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
close() |
ClientConfiguration |
getClientConfiguration() |
protected abstract RetryStrategy |
getDefaultRetryStrategy() |
abstract boolean |
isOpen() |
<T> Future<org.apache.http.HttpResponse> |
sendRequest(RequestMessage request,
ExecutionContext context,
HttpCallback<T> callback) |
protected abstract <T> Future<org.apache.http.HttpResponse> |
sendRequestCore(ServiceClient.Request request,
ExecutionContext context,
HttpCallback<T> callback)
Implements the core logic to send requests to Aliyun services.
|
protected ClientConfiguration config
protected ServiceClient(ClientConfiguration config)
public ClientConfiguration getClientConfiguration()
public <T> Future<org.apache.http.HttpResponse> sendRequest(RequestMessage request, ExecutionContext context, HttpCallback<T> callback)
protected abstract <T> Future<org.apache.http.HttpResponse> sendRequestCore(ServiceClient.Request request, ExecutionContext context, HttpCallback<T> callback) throws Exception
T - Trequest - requestcontext - contextcallback - callbackException - exceptionprotected abstract void close()
public abstract boolean isOpen()
protected abstract RetryStrategy getDefaultRetryStrategy()
Copyright © 2024. All Rights Reserved.