程序包 | 说明 |
---|---|
com.tencent.cos.xml |
限定符和类型 | 方法和说明 |
---|---|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.addHeader(java.lang.String key,
java.lang.String value)
给所有的请求统一添加 Header
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.addNoSignHeaders(java.lang.String key) |
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.dnsCache(boolean dnsCache)
是否开启 DNS 解析缓存,开启后,将 DNS 解析的结果缓存在本地,
当系统 DNS 解析失败后,会使用本地缓存的 DNS 结果
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.enableQuic(boolean isEnable)
是否使能 Quic 协议,使能后,还需要额外引入 quic sdk 才能正常使用
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.isHttps(boolean isHttps)
设置是否 Https 协议,默认为 Https
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.newBuilder() |
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setAccelerate(boolean accelerate)
是否使用全球加速域名
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setAppidAndRegion(java.lang.String appid,
java.lang.String region)
已过时。
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setBucketInPath(boolean bucketInPath)
已过时。
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setConnectionTimeout(int connectionTimeoutMills)
设置连接超时时间
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setDebuggable(boolean isDebuggable)
是否打印 Debug 日志
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setDownloadMaxThreadCount(int downloadMaxThreadCount)
设置下载时线程并发的最大值
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setEndpointSuffix(java.lang.String endpointSuffix)
已过时。
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setExecutor(java.util.concurrent.Executor excutor)
自定义线程池
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setHost(java.lang.String host)
设置除了 GetService 请求外的 host
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setHost(android.net.Uri uri)
设置除了 GetService 请求外的 Uri,用于解析 host、port 和 protocol
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setHostFormat(java.lang.String hostFormat)
设置 Host 的格式化字符串,sdk 会将 ${bucket} 替换为真正的 bucket,${region} 替换为真正的 region,
比如将 hostFormat 设置为 ${bucket}.
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setObserveExecutor(java.util.concurrent.Executor observeExecutor) |
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setPathStyle(boolean pathStyle)
设置 Bucket 参数在请求 Url 的 path 中,而是不 host 中,
比如 cos.ap-shanghai.myqcloud.com/1250000000-bucket/readMe.txt
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setPort(int port) |
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setRegion(java.lang.String region)
设置默认地域
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setRetryHandler(QCloudHttpRetryHandler qCloudHttpRetryHandler)
自定义重试策略
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setRetryStrategy(RetryStrategy retryStrategy)
自定义重试策略
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setSignInUrl(boolean signInUrl)
是否将签名放在 URL 中,默认放在 Header 中
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setSocketTimeout(int socketTimeoutMills)
设置 Socket 超时时间
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setTransferThreadControl(boolean transferThreadControl)
设置传输时是否进行线程并发控制
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setUploadMaxThreadCount(int uploadMaxThreadCount)
设置上传时线程并发的最大值
|
CosXmlServiceConfig.Builder |
CosXmlServiceConfig.Builder.setUserAgentExtended(java.lang.String userAgentExtended)
设置ua拓展参数
|
构造器和说明 |
---|
CosXmlServiceConfig(CosXmlServiceConfig.Builder builder) |