Class POBRequest
-
- All Implemented Interfaces:
-
com.pubmatic.sdk.common.base.POBAdRequest
public class POBRequest implements POBAdRequestClass to represent the OpenWrap ad request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumPOBRequest.AdPositionFold placement of the ad to be served.
public enumPOBRequest.APISupported API of the ad to be served.
-
Field Summary
Fields Modifier and Type Field Description public final Array<POBImpression>impressionspublic final intprofileIdpublic final StringpubIdpublic IntegerversionIdpublic final POBAdFormatplacementTypepublic BooleantestModepublic StringadServerUrl
-
Method Summary
Modifier and Type Method Description Array<POBImpression>getImpressions()Returns the array of impression object intgetProfileId()Returns the profile Id. StringgetPubId()IntegergetVersionId()Returns OpenWrap version Id voidsetVersionId(@Nullable() Integer versionId)This is an optional OpenWrap version Id of the publisher. POBAdFormatgetPlacementType()Returns the OpenWrap ad format type BooleangetTestMode()Returns test Mode of the OpenWrap request StringgetAdServerUrl()Returns value of Ad Server Url if it is set by method voidsetAdServerUrl(@Nullable() String adServerUrl)Setter method to set Ad Server Url Custom server URL for debugging purpose. static POBRequestcreateInstance(@NonNull() String pubId, int profileId, @NonNull() POBAdFormat placementType, @NonNull() Array<POBImpression> impressions)Returns the object of the POBRequest with provided parameters. booleanisDebugStateEnabled()Returns the debug state. voidenableDebugState(boolean state)Enable/Disable debug information in the response. intgetNetworkTimeout()Returns the network timeout (in seconds) for making an Ad request. voidsetNetworkTimeout(int networkTimeoutInSec)Sets the network timeout (in seconds) for making an Ad request. StringgetAdUnitId()Returns the Ad unit ID from the 0th index of impression array. voidenableReturnAllBidStatus(boolean state)Set to true if seatnonbids in response should be enabled. voidenableTestMode(boolean testMode)Setter method to set Test mode of the request By default set to false When set to true, PubMatic may deliver only test ads which are not billable. -
-
Method Detail
-
getImpressions
@Nullable() Array<POBImpression> getImpressions()
Returns the array of impression object
- Returns:
Array of impression object
-
getProfileId
int getProfileId()
Returns the profile Id.
- Returns:
profile Id
-
getVersionId
@Deprecated()@Nullable() Integer getVersionId()
Returns OpenWrap version Id
- Returns:
OpenWrap version Id
-
setVersionId
@Deprecated() void setVersionId(@Nullable() Integer versionId)
This is an optional OpenWrap version Id of the publisher. If this is not specified, live version of the above profile is considered.
- Parameters:
versionId- OpenWrap version Id
-
getPlacementType
@NonNull() POBAdFormat getPlacementType()
Returns the OpenWrap ad format type
- Returns:
OpenWrap ad format type
-
getTestMode
@Nullable() Boolean getTestMode()
Returns test Mode of the OpenWrap request
- Returns:
boolean value of test mode
-
getAdServerUrl
@Nullable() String getAdServerUrl()
Returns value of Ad Server Url if it is set by method
- Returns:
Ad Server Url
-
setAdServerUrl
void setAdServerUrl(@Nullable() String adServerUrl)
Setter method to set Ad Server Url Custom server URL for debugging purpose.
- Parameters:
adServerUrl- string Url
-
createInstance
@Nullable() static POBRequest createInstance(@NonNull() String pubId, int profileId, @NonNull() POBAdFormat placementType, @NonNull() Array<POBImpression> impressions)
Returns the object of the POBRequest with provided parameters. Returns null if any of the impression objects or publisher id is not valid
- Parameters:
pubId- Identifier of the publisherprofileId- Profile ID of an ad tagimpressions- Objects of POBImpression, separated by comma in case of multiple values.- Returns:
Instance of the POBRequest
-
isDebugStateEnabled
boolean isDebugStateEnabled()
Returns the debug state. False means no debug information will be available in bid response.
- Returns:
debug state
-
enableDebugState
void enableDebugState(boolean state)
Enable/Disable debug information in the response. By default, debug is disabled and no debug information will be available in bid response.
- Parameters:
state- debug state
-
getNetworkTimeout
int getNetworkTimeout()
Returns the network timeout (in seconds) for making an Ad request.
- Returns:
network timeout (in seconds).
-
setNetworkTimeout
void setNetworkTimeout(int networkTimeoutInSec)
Sets the network timeout (in seconds) for making an Ad request. Default value is 5 seconds. Provided value should be greater than 0.
- Parameters:
networkTimeoutInSec- value in seconds
-
getAdUnitId
@NonNull() String getAdUnitId()
Returns the Ad unit ID from the 0th index of impression array. In case Ad unit ID is not available then returns empty string.
- Returns:
Ad unit ID from the 0th index of impression array
-
enableReturnAllBidStatus
void enableReturnAllBidStatus(boolean state)
Set to true if seatnonbids in response should be enabled. By default it is set to false To check the seatnonbids set the log level to Debug by following Enable SDK Logs. After response is received check for Received Seat Non Bids: in the logs for the seatnonbids json array received. The json array contains the statusCode with the rejection of the bid for each partner.
- Parameters:
state- true if seatnonbid in response is expected
-
enableTestMode
void enableTestMode(boolean testMode)
Setter method to set Test mode of the request By default set to false When set to true, PubMatic may deliver only test ads which are not billable. Please disable the Test Mode for requests before you submit your application to the play store.
- Parameters:
testMode- boolean value, either true or false
-
-
-
-