类 BaseServiceImpl
java.lang.Object
com.bytedanceapi.service.BaseServiceImpl
- 所有已实现的接口:
IBaseService
- 直接已知子类:
IamServiceImpl,ImageXServiceImpl,VodServiceImpl
public abstract class BaseServiceImpl extends Object implements IBaseService
-
字段概要
字段 修饰符和类型 字段 说明 protected Map<String,ApiInfo>apiInfoListprotected ServiceInfoserviceInfo -
构造器概要
构造器 构造器 说明 BaseServiceImpl(ServiceInfo info, Map<String,ApiInfo> apiInfoList) -
方法概要
修饰符和类型 方法 说明 StringgetAccessKey()Gets access key.Map<String,ApiInfo>getApiInfoList()org.apache.http.client.HttpClientgetHttpClient()ISignerV4getISigner()StringgetSecretKey()Gets secret key.ServiceInfogetServiceInfo()StringgetSignUrl(String api, List<org.apache.http.NameValuePair> params)Gets sign url.RawResponsejson(String api, List<org.apache.http.NameValuePair> params, String body)Json raw response.RawResponsepost(String api, List<org.apache.http.NameValuePair> query, List<org.apache.http.NameValuePair> form)Post raw response.booleanput(String url, String filePath, Map<String,String> headers)Put boolean.booleanputData(String url, byte[] data, Map<String,String> headers)Put binary data.RawResponsequery(String api, List<org.apache.http.NameValuePair> params)Query raw response.voidsetAccessKey(String accessKey)Sets access key.voidsetClientNoReuse()Sets client no reuse.voidsetConnectionTimeout(int connectionTimeout)Sets connection timeout.voidsetHost(String host)Sets host.voidsetHttpClient(org.apache.http.client.HttpClient httpClient)Sets http client.voidsetRegion(String region)Sets region.voidsetScheme(String scheme)Sets scheme.voidsetSecretKey(String secretKey)Sets secret key.voidsetServiceInfo(ServiceInfo serviceInfo)Sets service info.voidsetSocketTimeout(int socketTimeout)Sets socket timeout.SecurityToken2signSts2(Policy inlinePolicy, long expire)Sign by sts2.
-
字段详细资料
-
构造器详细资料
-
方法详细资料
-
getSignUrl
从接口复制的说明:IBaseServiceGets sign url.- 指定者:
getSignUrl在接口中IBaseService- 参数:
api- the apiparams- the params- 返回:
- the sign url
- 抛出:
Exception- the exception
-
query
从接口复制的说明:IBaseServiceQuery raw response.- 指定者:
query在接口中IBaseService- 参数:
api- the apiparams- the params- 返回:
- the raw response
-
put
从接口复制的说明:IBaseServicePut boolean.- 指定者:
put在接口中IBaseService- 参数:
url- the urlfilePath- the file pathheaders- the headers- 返回:
- the boolean
-
putData
从接口复制的说明:IBaseServicePut binary data.- 指定者:
putData在接口中IBaseService- 参数:
url- target urldata- binary dataheaders- http headers- 返回:
- put status
-
json
从接口复制的说明:IBaseServiceJson raw response.- 指定者:
json在接口中IBaseService- 参数:
api- the apiparams- the paramsbody- the body- 返回:
- the raw response
-
post
public RawResponse post(String api, List<org.apache.http.NameValuePair> query, List<org.apache.http.NameValuePair> form)从接口复制的说明:IBaseServicePost raw response.- 指定者:
post在接口中IBaseService- 参数:
api- the apiquery- the paramsform- the form- 返回:
- the raw response
-
setClientNoReuse
public void setClientNoReuse()从接口复制的说明:IBaseServiceSets client no reuse.- 指定者:
setClientNoReuse在接口中IBaseService
-
getAccessKey
从接口复制的说明:IBaseServiceGets access key.- 指定者:
getAccessKey在接口中IBaseService- 返回:
- the access key
-
setAccessKey
从接口复制的说明:IBaseServiceSets access key.- 指定者:
setAccessKey在接口中IBaseService- 参数:
accessKey- the access key
-
getSecretKey
从接口复制的说明:IBaseServiceGets secret key.- 指定者:
getSecretKey在接口中IBaseService- 返回:
- the secret key
-
setSecretKey
从接口复制的说明:IBaseServiceSets secret key.- 指定者:
setSecretKey在接口中IBaseService- 参数:
secretKey- the secret key
-
setRegion
从接口复制的说明:IBaseServiceSets region.- 指定者:
setRegion在接口中IBaseService- 参数:
region- the region
-
setHost
从接口复制的说明:IBaseServiceSets host.- 指定者:
setHost在接口中IBaseService- 参数:
host- the host
-
setScheme
从接口复制的说明:IBaseServiceSets scheme.- 指定者:
setScheme在接口中IBaseService- 参数:
scheme- the scheme
-
getHttpClient
public org.apache.http.client.HttpClient getHttpClient() -
setHttpClient
public void setHttpClient(org.apache.http.client.HttpClient httpClient)从接口复制的说明:IBaseServiceSets http client.- 指定者:
setHttpClient在接口中IBaseService- 参数:
httpClient- the http client
-
getServiceInfo
-
setServiceInfo
从接口复制的说明:IBaseServiceSets service info.- 指定者:
setServiceInfo在接口中IBaseService- 参数:
serviceInfo- the service info
-
getApiInfoList
-
getISigner
-
setSocketTimeout
public void setSocketTimeout(int socketTimeout)从接口复制的说明:IBaseServiceSets socket timeout.- 指定者:
setSocketTimeout在接口中IBaseService- 参数:
socketTimeout- the socket timeout
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)从接口复制的说明:IBaseServiceSets connection timeout.- 指定者:
setConnectionTimeout在接口中IBaseService- 参数:
connectionTimeout- the connection timeout
-
signSts2
从接口复制的说明:IBaseServiceSign by sts2.- 指定者:
signSts2在接口中IBaseService- 参数:
inlinePolicy- the Policyexpire- expire time- 返回:
- the sts2
- 抛出:
Exception- the exception
-