类 GenericRequest
java.lang.Object
com.obs.services.model.GenericRequest
- 直接已知子类:
AbstractBulkRequest,BaseBucketRequest,BaseObjectRequest,ContentSummaryFsRequest,CreateBucketRequest,DeleteObjectsRequest,GetSnapshottableDirListRequest,ListContentSummaryFsRequest,ListContentSummaryRequest,ListMultipartUploadsRequest,ListObjectsRequest,ListVersionsRequest,OptionsInfoRequest,ReadAheadRequest
Basic class of all requests, which encapsulates common parameters used by all requests.
- 从以下版本开始:
- 3.20.3
-
字段概要
字段修饰符和类型字段说明protected Stringprotected com.obs.services.internal.utils.CallCancelHandlerprotected HttpMethodEnum -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddUserHeaders(String key, String value) Obtain the bucket name.com.obs.services.internal.utils.CallCancelHandlerbooleanIf the requester is allowed to pay, true is returned.voidsetBucketName(String bucketName) Set the bucket name.voidsetCancelHandler(com.obs.services.internal.utils.CallCancelHandler cancelHandler) voidsetRequesterPays(boolean isRequesterPays) Used to configure whether to enable the requester-pays function.voidsetUserHeaders(HashMap<String, String> userHeaders) toString()
-
字段详细资料
-
bucketName
-
userHeaders
-
httpMethod
-
cancelHandler
protected com.obs.services.internal.utils.CallCancelHandler cancelHandler
-
-
构造器详细资料
-
GenericRequest
public GenericRequest() -
GenericRequest
-
-
方法详细资料
-
getHttpMethod
-
setBucketName
-
getBucketName
-
addUserHeaders
-
setUserHeaders
-
getUserHeaders
-
isRequesterPays
public boolean isRequesterPays()If the requester is allowed to pay, true is returned. Otherwise, false is returned.If the requester-pays function is enabled for a bucket, this attribute must be set to true when the bucket is requested by a requester other than the bucket owner. Otherwise, status code 403 is returned.
After the requester-pays function is enabled, anonymous access to the bucket is not allowed.
- 返回:
- If the requester is allowed to pay, true is returned. Otherwise, false is returned.
-
setRequesterPays
public void setRequesterPays(boolean isRequesterPays) Used to configure whether to enable the requester-pays function.If the requester-pays function is enabled for a bucket, this attribute must be set to true when the bucket is requested by a requester other than the bucket owner. Otherwise, status code 403 is returned.
After the requester-pays function is enabled, anonymous access to the bucket is not allowed.
- 参数:
isRequesterPays- True indicates to enable the requester-pays function. False indicates to disable the requester-pays function.
-
toString
-
getCancelHandler
public com.obs.services.internal.utils.CallCancelHandler getCancelHandler() -
setCancelHandler
public void setCancelHandler(com.obs.services.internal.utils.CallCancelHandler cancelHandler)
-