public abstract class ObjectRequest extends CosXmlRequest
CosXmlRequest.OnRequestWeightListener
限定符和类型 | 字段和说明 |
---|---|
protected java.lang.String |
cosPath
对象在cos上的路径
|
bucket, noSignHeaders, noSignParams, priority, qCloudTaskStateListener, queryParameters, region, requestHeaders, requestURL, signSourceProvider
构造器和说明 |
---|
ObjectRequest(java.lang.String bucket,
java.lang.String cosPath)
对象相关请求基类
|
限定符和类型 | 方法和说明 |
---|---|
void |
checkParameters()
sdk 参数校验
|
protected java.lang.String |
getContentType() |
java.lang.String |
getCosPath()
获取对象在cos上的路径
|
java.lang.String |
getPath(CosXmlServiceConfig config)
支持 CSP 的 Bucket 可能在 path 上
|
void |
setCosPath(java.lang.String cosPath)
设置对象在cos上的路径
|
void |
setCOSServerSideEncryption()
C
对象SSE-COS服务端加密配置
|
void |
setCOSServerSideEncryptionWithCustomerKey(java.lang.String customerKey)
对象SSE-C服务端加密配置
|
void |
setCOSServerSideEncryptionWithKMS(java.lang.String customerKeyID,
java.lang.String json)
对象SSE-KMS服务端加密配置
|
addHeader, addNoSignHeader, addNoSignParams, addQuery, attachMetrics, getBucket, getHttpTask, getKeyTime, getMethod, getMetrics, getNoSignHeaders, getNoSignParams, getPriority, getQueryEncodedString, getQueryString, getRegion, getRequestBody, getRequestHeaders, getRequestHost, getRequestURL, getSignSourceProvider, getSTSCredentialScope, getWeight, headersHasUnsafeNonAscii, isNeedMD5, isSignInUrl, isSupportAccelerate, isSupportAccelerate, setNeedMD5, setOnRequestWeightListener, setQueryEncodedString, setQueryParameters, setRegion, setRequestHeaders, setRequestHeaders, setRequestHeaders, setRequestURL, setSign, setSign, setSign, setSign, setSign, setSignInUrl, setSignKeyTime, setSignParamsAndHeaders, setSignSourceProvider, setTask, setTaskStateListener, xmlBuilder
public ObjectRequest(java.lang.String bucket, java.lang.String cosPath)
bucket
- 存储桶名cosPath
- cos上的路径public void setCosPath(java.lang.String cosPath)
cosPath
- 对象在cos上的路径public java.lang.String getPath(CosXmlServiceConfig config)
getPath
在类中 CosXmlRequest
config
- 服务配置public java.lang.String getCosPath()
public void checkParameters() throws CosXmlClientException
CosXmlRequest
checkParameters
在类中 CosXmlRequest
CosXmlClientException
- cosXmlClientExceptionpublic void setCOSServerSideEncryption()
public void setCOSServerSideEncryptionWithCustomerKey(java.lang.String customerKey) throws CosXmlClientException
customerKey
- 服务端加密密钥CosXmlClientException
- 客户端异常public void setCOSServerSideEncryptionWithKMS(java.lang.String customerKeyID, java.lang.String json) throws CosXmlClientException
customerKeyID
- 用于指定 KMS 的用户主密钥 CMK,如不指定,则使用 COS 默认创建的 CMKjson
- 用于指定加密上下文,值为 JSON 格式加密上下文键值对的 Base64 编码CosXmlClientException
- 客户端代理protected java.lang.String getContentType()