public abstract class BaseServiceImpl extends Object implements IBaseService
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,ApiInfo> |
apiInfoList |
protected ServiceInfo |
serviceInfo |
| 构造器和说明 |
|---|
BaseServiceImpl(ServiceInfo info,
org.apache.http.HttpHost proxy,
Map<String,ApiInfo> apiInfoList) |
BaseServiceImpl(ServiceInfo info,
Map<String,ApiInfo> apiInfoList) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getAccessKey()
Gets access key.
|
Map<String,ApiInfo> |
getApiInfoList() |
org.apache.http.client.HttpClient |
getHttpClient() |
ISignerV4 |
getISigner() |
String |
getRegion()
Gets region.
|
String |
getSecretKey()
Gets secret key.
|
ServiceInfo |
getServiceInfo() |
String |
getSignUrl(String api,
List<org.apache.http.NameValuePair> params)
Gets sign url.
|
RawResponse |
json(String api,
List<org.apache.http.NameValuePair> params,
String body)
Json raw response.
|
RawResponse |
post(String api,
List<org.apache.http.NameValuePair> query,
List<org.apache.http.NameValuePair> form)
Post raw response.
|
boolean |
put(String url,
String filePath,
Map<String,String> headers)
Put boolean.
|
boolean |
putData(String url,
byte[] data,
Map<String,String> headers)
Put binary data.
|
org.apache.http.HttpResponse |
putDataWithResponse(String url,
byte[] data,
Map<String,String> headers) |
RawResponse |
query(String api,
List<org.apache.http.NameValuePair> params)
Query raw response.
|
void |
setAccessKey(String accessKey)
Sets access key.
|
void |
setClientNoReuse()
Sets client no reuse.
|
void |
setConnectionTimeout(int connectionTimeout)
Sets connection timeout.
|
void |
setHost(String host)
Sets host.
|
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Sets http client.
|
void |
setRegion(String region)
Sets region.
|
void |
setScheme(String scheme)
Sets scheme.
|
void |
setSecretKey(String secretKey)
Sets secret key.
|
void |
setServiceInfo(ServiceInfo serviceInfo)
Sets service info.
|
void |
setSocketTimeout(int socketTimeout)
Sets socket timeout.
|
SecurityToken2 |
signSts2(Policy inlinePolicy,
long expire)
Sign by sts2.
|
protected ServiceInfo serviceInfo
public BaseServiceImpl(ServiceInfo info, org.apache.http.HttpHost proxy, Map<String,ApiInfo> apiInfoList)
public BaseServiceImpl(ServiceInfo info, Map<String,ApiInfo> apiInfoList)
public String getSignUrl(String api, List<org.apache.http.NameValuePair> params) throws Exception
IBaseServicegetSignUrl 在接口中 IBaseServiceapi - the apiparams - the paramsException - the exceptionpublic RawResponse query(String api, List<org.apache.http.NameValuePair> params)
IBaseServicequery 在接口中 IBaseServiceapi - the apiparams - the paramspublic boolean put(String url, String filePath, Map<String,String> headers)
IBaseServiceput 在接口中 IBaseServiceurl - the urlfilePath - the file pathheaders - the headerspublic boolean putData(String url, byte[] data, Map<String,String> headers)
IBaseServiceputData 在接口中 IBaseServiceurl - target urldata - binary dataheaders - http headerspublic org.apache.http.HttpResponse putDataWithResponse(String url, byte[] data, Map<String,String> headers)
public RawResponse json(String api, List<org.apache.http.NameValuePair> params, String body)
IBaseServicejson 在接口中 IBaseServiceapi - the apiparams - the paramsbody - the bodypublic RawResponse post(String api, List<org.apache.http.NameValuePair> query, List<org.apache.http.NameValuePair> form)
IBaseServicepost 在接口中 IBaseServiceapi - the apiquery - the paramsform - the formpublic void setClientNoReuse()
IBaseServicesetClientNoReuse 在接口中 IBaseServicepublic String getAccessKey()
IBaseServicegetAccessKey 在接口中 IBaseServicepublic void setAccessKey(String accessKey)
IBaseServicesetAccessKey 在接口中 IBaseServiceaccessKey - the access keypublic String getSecretKey()
IBaseServicegetSecretKey 在接口中 IBaseServicepublic void setSecretKey(String secretKey)
IBaseServicesetSecretKey 在接口中 IBaseServicesecretKey - the secret keypublic void setRegion(String region)
IBaseServicesetRegion 在接口中 IBaseServiceregion - the regionpublic String getRegion()
IBaseServicegetRegion 在接口中 IBaseServicepublic void setHost(String host)
IBaseServicesetHost 在接口中 IBaseServicehost - the hostpublic void setScheme(String scheme)
IBaseServicesetScheme 在接口中 IBaseServicescheme - the schemepublic org.apache.http.client.HttpClient getHttpClient()
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
IBaseServicesetHttpClient 在接口中 IBaseServicehttpClient - the http clientpublic ServiceInfo getServiceInfo()
public void setServiceInfo(ServiceInfo serviceInfo)
IBaseServicesetServiceInfo 在接口中 IBaseServiceserviceInfo - the service infopublic ISignerV4 getISigner()
public void setSocketTimeout(int socketTimeout)
IBaseServicesetSocketTimeout 在接口中 IBaseServicesocketTimeout - the socket timeoutpublic void setConnectionTimeout(int connectionTimeout)
IBaseServicesetConnectionTimeout 在接口中 IBaseServiceconnectionTimeout - the connection timeoutpublic SecurityToken2 signSts2(Policy inlinePolicy, long expire) throws Exception
IBaseServicesignSts2 在接口中 IBaseServiceinlinePolicy - the Policyexpire - expire timeException - the exceptionCopyright © 2021. All rights reserved.