public class POBImpression
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected POBRequest.AdPosition |
adPosition |
protected java.lang.String |
adUnitId
The unique identifier which represents an ad placement on the app screen.
|
protected java.lang.String |
id
This parameter is used to hold impression identifier
|
protected java.lang.String |
pmZoneId
This parameter is used to pass a zone ID for reporting.
|
protected java.lang.String |
testCreativeId
This parameter is used to request a test creative.
|
| Constructor and Description |
|---|
POBImpression(java.lang.String id,
java.lang.String adUnitId)
Constructor
|
POBImpression(java.lang.String id,
java.lang.String adUnitId,
boolean isRewardedAd,
boolean isInterstitial)
Constructor to be used for creating Impression object for the Rewarded Ad
|
| Modifier and Type | Method and Description |
|---|---|
POBRequest.AdPosition |
getAdPosition()
Returns the Fold placement of the ad to be served.
|
java.lang.String |
getAdUnitId()
Returns the unique identifier which represents an ad placement on the app screen.
|
com.pubmatic.sdk.openwrap.core.POBBanner |
getBanner()
ORTB banner object
|
protected java.lang.String |
getCustomData() |
protected JSONObject |
getExtJson(JSONArray pubmaticJsonArray) |
java.lang.String |
getId()
Returns the unique identifier of the impression.
|
JSONObject |
getImpressionJson()
(Internal for OpenWrap SDK)
|
com.pubmatic.sdk.openwrap.core.POBNative |
getNative()
ORTB native object
|
java.lang.String |
getTestCreativeId()
Returns a test creative id.
|
com.pubmatic.sdk.openwrap.core.POBVideo |
getVideo()
ORTB video object
|
boolean |
isInterstitial()
Returns true if this impression is configured for Interstitials ad, else return false
|
boolean |
isRewardedAd()
Returns true if this impression is configured for Rewarded ad, else return false
|
protected JSONObject |
putKeyValueObject(java.lang.String key,
java.lang.Object... array) |
void |
setAdPosition(POBRequest.AdPosition adPosition)
Sets the fold placement of the ad to be served.
|
void |
setBanner(com.pubmatic.sdk.openwrap.core.POBBanner banner)
To set ortb banner
|
void |
setCustomParam(java.util.Map<java.lang.String,java.util.List<java.lang.String>> map)
Adds custom key-value parameters in an Ad request.
|
void |
setInterstitial(boolean interstitial)
Set true if the impression is configured for insterstitial
|
void |
setNative(com.pubmatic.sdk.openwrap.core.POBNative pobNative)
Sets the oRTB native object
|
void |
setPMZoneId(java.lang.String pmZoneId)
Set the zone id.
|
void |
setTestCreativeId(java.lang.String testCreativeId)
This parameter is used to request a test creative.
|
void |
setVideo(com.pubmatic.sdk.openwrap.core.POBVideo video)
To set Ortb video
|
@NonNull protected final java.lang.String id
@NonNull protected final java.lang.String adUnitId
@Nullable protected java.lang.String pmZoneId
@Nullable protected java.lang.String testCreativeId
@NonNull protected POBRequest.AdPosition adPosition
public POBImpression(@NonNull
java.lang.String id,
@NonNull
java.lang.String adUnitId)
id - Impression IdadUnitId - Ad unit Idpublic POBImpression(@NonNull
java.lang.String id,
@NonNull
java.lang.String adUnitId,
boolean isRewardedAd,
boolean isInterstitial)
id - Impression IdadUnitId - Ad unit IdisRewardedAd - true for identifying as Rewarded AdisInterstitial - true for identifying as Interstitial Rewarded Adpublic void setNative(@Nullable
com.pubmatic.sdk.openwrap.core.POBNative pobNative)
pobNative - oRTB object for Native Ad@Nullable public com.pubmatic.sdk.openwrap.core.POBNative getNative()
public void setVideo(@Nullable
com.pubmatic.sdk.openwrap.core.POBVideo video)
video - the POBVideo@Nullable public com.pubmatic.sdk.openwrap.core.POBVideo getVideo()
public void setBanner(@Nullable
com.pubmatic.sdk.openwrap.core.POBBanner banner)
banner - the POBBanner@Nullable public com.pubmatic.sdk.openwrap.core.POBBanner getBanner()
public boolean isInterstitial()
public void setInterstitial(boolean interstitial)
interstitial - true if the impression is configured for insterstitial, else falsepublic boolean isRewardedAd()
@NonNull
public JSONObject getImpressionJson()
throws JSONException
JSONException - throws JSONException@NonNull public java.lang.String getId()
@NonNull public java.lang.String getAdUnitId()
public void setPMZoneId(@Nullable
java.lang.String pmZoneId)
pmZoneId - zone id@NonNull
protected JSONObject putKeyValueObject(@Nullable
java.lang.String key,
@Nullable
java.lang.Object... array)
@Nullable public java.lang.String getTestCreativeId()
public void setTestCreativeId(@Nullable
java.lang.String testCreativeId)
testCreativeId - test creative id.@Nullable protected java.lang.String getCustomData()
@Nullable
protected JSONObject getExtJson(@Nullable
JSONArray pubmaticJsonArray)
public void setCustomParam(@Nullable
java.util.Map<java.lang.String,java.util.List<java.lang.String>> map)
map - map of key-value pair@NonNull public POBRequest.AdPosition getAdPosition()
public void setAdPosition(@NonNull
POBRequest.AdPosition adPosition)
adPosition - Value of ad placement