目录

VastSdkConfiguration

Class Info

public class VastSdkConfiguration

HUAWEI VAST SDK初始化配置类。

Public Method Summary

Qualifier and Type

Method Name and Description

int

getHttpCallTimeoutMs()

获取配置的网络请求超时时长。

int

getHttpConnectTimeoutMs()

获取配置的网络连接超时时长。

int

getHttpKeepAliveDurationMs()

获取设置的用于素材下载和VAST协议事件上报使用的连接的KeepAlive时长。

int

getHttpReadTimeoutMs()

获取配置的网络读取超时时间。

int

getMaxHttpConnections()

获取设置的素材下载和VAST协议事件上报使用的最大连接数。

int

getMaxRedirectWrapperLimit()

获取设置的VAST Wrapper最大跳转次数限制。

int

getVastEventRetryBatchSize()

获取配置的VAST协议事件重试上报时,每次重试的监测地址数量。

int

getVastEventRetryIntervalSeconds()

获取VAST协议事件重试上报间隔上一次失败的时间间隔秒数。

int

getVastEventRetryUploadTimes()

获取当前设置的VAST协议事件上报最大重试次数。

boolean

isTest()

获取广告是否为测试广告。

void

setHttpCallTimeoutMs(int httpCallTimeoutMs)

设置网络超时时长。

void

setHttpConnectTimeoutMs(int httpConnectTimeoutMs)

设置网络连接超时时长。

void

setHttpKeepAliveDurationMs(int httpKeepAliveDurationMs)

设置用于素材下载和VAST协议事件上报使用的网络连接的KeepAlive时长。

void

setHttpReadTimeoutMs(int httpReadTimeoutMs)

设置网络响应读取超时时间。

void

setMaxHttpConnections(int maxHttpConnections)

设置用于素材下载和VAST协议事件上报使用的最大连接数。

void

setMaxRedirectWrapperLimit(int maxRedirectWrapperLimit)

设置VAST Wrapper最大跳转次数。

void

setTest(boolean isTestConfig)

设置为是否从服务端获取用于测试的广告。

void

setVastEventRetryBatchSize(int vastEventRetryBatchSize)

设置VAST协议事件重试上报时,每次重试的监测地址数量。

void

setVastEventRetryIntervalSeconds(int vastEventRetryIntervalSeconds)

设置VAST协议事件重试上报间隔上一次失败的时间间隔秒数。

void

setVastEventRetryUploadTimes(int vastEventRetryUploadTimes)

设置当前VAST协议事件上报最大重试次数。

Public Methods

[h2]getHttpCallTimeoutMs

Method

public int getHttpCallTimeoutMs()

获取配置的网络请求超时时长。

Returns

Type

Description

int

配置的网络请求超时时长,单位:毫秒。

[h2]getHttpConnectTimeoutMs

Method

public int getHttpConnectTimeoutMs()

获取配置的网络连接超时时长。

Returns

Type

Description

int

配置的网络连接超时时长,单位:毫秒。

[h2]getHttpKeepAliveDurationMs

Method

public int getHttpKeepAliveDurationMs()

获取设置的用于素材下载和VAST事件上报使用的连接的KeepAlive时长。

Returns

Type

Description

int

KeepAlive时长,单位:毫秒。

[h2]getHttpReadTimeoutMs

Method

public int getHttpReadTimeoutMs()

获取配置的网络读取超时时间。

Returns

Type

Description

int

超时时间,单位:毫秒。

[h2]getMaxHttpConnections

Method

public int getMaxHttpConnections()

获取设置的素材下载和VAST协议事件上报使用的最大连接数。

Returns

Type

Description

int

最大连接数。

[h2]getMaxRedirectWrapperLimit

Method

public int getMaxRedirectWrapperLimit()

获取设置的VAST Wrapper最大跳转次数限制。

Returns

Type

Description

int

VAST Wrapper最大跳转次数限制。

[h2]getVastEventRetryBatchSize

Method

public int getVastEventRetryBatchSize()

获取配置的VAST协议事件重试上报时,每次重试的监测地址数量。

Returns

Type

Description

int

每次重试的监测地址数量。

[h2]getVastEventRetryIntervalSeconds

Method

public int getVastEventRetryIntervalSeconds()

获取VAST协议事件重试上报间隔上一次失败的时间间隔秒数。

Returns

Type

Description

int

时间间隔秒数,单位:秒。

[h2]getVastEventRetryUploadTimes

Method

public int getVastEventRetryUploadTimes()

获取当前设置的VAST协议事件上报最大重试次数。

Returns

Type

Description

int

最大重试次数,默认:3次。

[h2]isTest

Method

public boolean isTest()

获取广告是否为测试广告。

Returns

Type

Description

boolean

是否为测试广告:

  • true:是
  • false:否

[h2]setHttpCallTimeoutMs

Method

public void setHttpCallTimeoutMs(int httpCallTimeoutMs)

设置网络超时时长。

Parameters

Type

Description

httpCallTimeoutMs

网络超时时长,单位:毫秒。

[h2]setHttpConnectTimeoutMs

Method

public void setHttpConnectTimeoutMs(int httpConnectTimeoutMs)

设置网络连接超时时长。

Parameters

Type

Description

httpConnectTimeoutMs

网络连接超时时长,单位:毫秒。

[h2]setHttpKeepAliveDurationMs

Method

public void setHttpKeepAliveDurationMs(int httpKeepAliveDurationMs)

设置用于素材下载和VAST事件上报使用的连接的KeepAlive时长。

Parameters

Type

Description

httpKeepAliveDurationMs

KeepAlive时长,单位:毫秒。

[h2]setHttpReadTimeoutMs

Method

public void setHttpReadTimeoutMs(int httpReadTimeoutMs)

设置网络响应读取超时时间。

Parameters

Type

Description

httpReadTimeoutMs

网络响应读取超时时间,单位:毫秒。

[h2]setMaxHttpConnections

Method

public void setMaxHttpConnections(int maxHttpConnections)

设置用于素材下载和VAST协议事件上报使用的最大连接数。

Parameters

Type

Description

maxHttpConnections

最大连接数。

[h2]setMaxRedirectWrapperLimit

Method

public void setMaxRedirectWrapperLimit(int maxRedirectWrapperLimit)

设置VAST Wrapper最大跳转次数。

Parameters

Type

Description

maxRedirectWrapperLimit

VAST Wrapper最大跳转次数。

[h2]setTest

Method

public void setTest(boolean isTestConfig)

设置是否从服务端获取用于测试的广告。

Parameters

Type

Description

isTestConfig

是否从服务端获取用于测试的广告。

  • true:是
  • false:否

[h2]setVastEventRetryBatchSize

Method

public void setVastEventRetryBatchSize(int vastEventRetryBatchSize)

设置VAST协议事件重试上报时,每次重试的监测地址数量。

Parameters

Type

Description

vastEventRetryBatchSize

监测地址数量。

[h2]setVastEventRetryIntervalSeconds

Method

public void setVastEventRetryIntervalSeconds(int vastEventRetryIntervalSeconds)

设置VAST协议事件重试上报间隔上一次失败的时间间隔秒数。

Parameters

Type

Description

vastEventRetryIntervalSeconds

时间间隔秒数,单位:秒。

[h2]setVastEventRetryUploadTimes

Method

public void setVastEventRetryUploadTimes(int vastEventRetryUploadTimes)

设置当前VAST协议事件上报最大重试次数。

Parameters

Type

Description

vastEventRetryUploadTimes

最大重试次数,默认:3次。