VastAdsRequest.Builder

  • VastAdsRequest.Builder is a builder class for VastAdsRequest.

  • It has a constructor to create a Builder instance.

  • You can set the VAST ad tag URL using setAdTagUrl.

  • You can set the VAST XML response directly using setAdsResponse, which takes precedence over the ad tag URL.

  • The build method creates the final VastAdsRequest object.

public static class VastAdsRequest.Builder extends Object

A builder for VastAdsRequest

Public Constructor Summary

Public Method Summary

VastAdsRequest
VastAdsRequest.Builder
setAdTagUrl(String adTagUrl)
Sets the URL for the VAST file, used to retrieve and identify the ad.
VastAdsRequest.Builder
setAdsResponse(String adsResponse)
Sets the VAST XML document that can be used as the ads response instead of making a request via an ad tag url.

Inherited Method Summary

Public Constructors

public Builder ()

Construct a VastAdsRequest.Builder.

Public Methods

public VastAdsRequest build ()

public VastAdsRequest.Builder setAdTagUrl (String adTagUrl)

Sets the URL for the VAST file, used to retrieve and identify the ad.

public VastAdsRequest.Builder setAdsResponse (String adsResponse)

Sets the VAST XML document that can be used as the ads response instead of making a request via an ad tag url. If this is set, adTagUrl is ignored. This can be useful for debugging and other situations where a VAST response is already available.