public interface IBaseService
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
Free monitor thread
|
String |
getAccessKey()
Gets access key.
|
String |
getRegion()
Gets region.
|
String |
getSecretKey()
Gets secret key.
|
String |
getSessionToken()
Gets session token.
|
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> params,
List<org.apache.http.NameValuePair> form)
Post raw response.
|
RawResponse |
proto(String api,
List<org.apache.http.NameValuePair> params,
Map<String,String> header,
byte[] body,
String compressType) |
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.
|
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 |
setSessionToken(String sessionToken)
Sets session token.
|
void |
setSocketTimeout(int socketTimeout)
Sets socket timeout.
|
SecurityToken2 |
signSts2(Policy inlinePolicy,
long expire)
Sign by sts2.
|
void setClientNoReuse()
String getAccessKey()
void setAccessKey(String accessKey)
accessKey - the access keyString getSecretKey()
void setSecretKey(String secretKey)
secretKey - the secret keyString getSessionToken()
void setSessionToken(String sessionToken)
sessionToken - the session tokenvoid setRegion(String region)
region - the regionString getRegion()
void setHost(String host)
host - the hostvoid setScheme(String scheme)
scheme - the schemevoid setHttpClient(org.apache.http.client.HttpClient httpClient)
httpClient - the http clientvoid setServiceInfo(ServiceInfo serviceInfo)
serviceInfo - the service infovoid setSocketTimeout(int socketTimeout)
socketTimeout - the socket timeoutvoid setConnectionTimeout(int connectionTimeout)
connectionTimeout - the connection timeoutRawResponse query(String api, List<org.apache.http.NameValuePair> params) throws Exception
api - the apiparams - the paramsException - the exceptionString getSignUrl(String api, List<org.apache.http.NameValuePair> params) throws Exception
api - the apiparams - the paramsException - the exceptionRawResponse json(String api, List<org.apache.http.NameValuePair> params, String body) throws Exception
api - the apiparams - the paramsbody - the bodyException - the exceptionRawResponse post(String api, List<org.apache.http.NameValuePair> params, List<org.apache.http.NameValuePair> form) throws Exception
api - the apiparams - the paramsform - the formException - the exceptionboolean put(String url, String filePath, Map<String,String> headers) throws Exception
url - the urlfilePath - the file pathheaders - the headersException - the exceptionboolean putData(String url, byte[] data, Map<String,String> headers) throws Exception
url - target urldata - binary dataheaders - http headersException - exceptionSecurityToken2 signSts2(Policy inlinePolicy, long expire) throws Exception
inlinePolicy - the Policyexpire - expire timeException - the exceptionRawResponse proto(String api, List<org.apache.http.NameValuePair> params, Map<String,String> header, byte[] body, String compressType)
api - interface path like /PutLogsparams - query paramsheader - some special header for protobufbody - request bodycompressType - default not compress,support lz4void destroy()
Copyright © 2024. All rights reserved.