public class GenericRequest extends Object
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected String |
bucketName |
|
protected com.obs.services.internal.utils.CallCancelHandler |
cancelHandler |
|
protected HttpMethodEnum |
httpMethod |
|
protected HashMap<String,String> |
userHeaders |
| 构造器 | 说明 |
|---|---|
GenericRequest() |
|
GenericRequest(String bucketName) |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
addUserHeaders(String key,
String value) |
|
String |
getBucketName() |
Obtain the bucket name.
|
com.obs.services.internal.utils.CallCancelHandler |
getCancelHandler() |
|
HttpMethodEnum |
getHttpMethod() |
|
HashMap<String,String> |
getUserHeaders() |
|
boolean |
isRequesterPays() |
If the requester is allowed to pay, true is returned.
|
void |
setBucketName(String bucketName) |
Set the bucket name.
|
void |
setCancelHandler(com.obs.services.internal.utils.CallCancelHandler cancelHandler) |
|
void |
setRequesterPays(boolean isRequesterPays) |
Used to configure whether to enable the requester-pays function.
|
void |
setUserHeaders(HashMap<String,String> userHeaders) |
|
String |
toString() |
protected String bucketName
protected HttpMethodEnum httpMethod
protected com.obs.services.internal.utils.CallCancelHandler cancelHandler
public GenericRequest()
public GenericRequest(String bucketName)
public HttpMethodEnum getHttpMethod()
public void setBucketName(String bucketName)
bucketName - Bucket namepublic String getBucketName()
public boolean isRequesterPays()
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.
public void setRequesterPays(boolean isRequesterPays)
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.public com.obs.services.internal.utils.CallCancelHandler getCancelHandler()
public void setCancelHandler(com.obs.services.internal.utils.CallCancelHandler cancelHandler)
Copyright © 2025. All rights reserved.