public abstract class BaseServiceImpl extends Object implements IBaseService
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,ApiInfo> |
apiInfoList |
protected ServiceInfo |
serviceInfo |
| 构造器和说明 |
|---|
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 |
getSecretKey()
Gets secret key.
|
ServiceInfo |
getServiceInfo() |
String |
getSignUrl(String api,
Map<String,String> params)
Gets sign url.
|
RawResponse |
json(String api,
Map<String,String> params,
String body)
Json raw response.
|
RawResponse |
post(String api,
Map<String,String> query,
Map<String,String> form)
Post raw response.
|
boolean |
put(String url,
String filePath,
Map<String,String> headers)
Put boolean.
|
RawResponse |
query(String api,
Map<String,String> 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 |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Sets http client.
|
void |
setRegion(String region)
Sets region.
|
void |
setSecretKey(String secretKey)
Sets secret key.
|
void |
setServiceInfo(ServiceInfo serviceInfo)
Sets service info.
|
void |
setSocketTimeout(int socketTimeout)
Sets socket timeout.
|
protected ServiceInfo serviceInfo
public BaseServiceImpl(ServiceInfo info, Map<String,ApiInfo> apiInfoList)
public String getSignUrl(String api, Map<String,String> params) throws Exception
IBaseServicegetSignUrl 在接口中 IBaseServiceapi - the apiparams - the paramsException - the exceptionpublic RawResponse query(String api, Map<String,String> 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 RawResponse json(String api, Map<String,String> params, String body)
IBaseServicejson 在接口中 IBaseServiceapi - the apiparams - the paramsbody - the bodypublic RawResponse post(String api, Map<String,String> query, Map<String,String> 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 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 timeoutCopyright © 2019. All rights reserved.