Package com.iab.omid.library.adsession
Class AdEvents
java.lang.Object
com.iab.omid.library.adsession.AdEvents
Ad event API enabling the integration partner to signal to all verification providers when key
events have occurred.
Only one ad events implementation can be associated with the ad session and any attempt to create
multiple instances will result in an exception.
Created by Natasha Garner on 04/09/2017.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AdEvents
createAdEvents
(AdSession adSession) Create ad events instance associated with the supplied ad session.void
Notify the ad session that an impression event has occurred.void
loaded()
Notify the ad session that a display loaded event has occurred.void
loaded
(VastProperties vastProperties) Notify the ad session that a video/audio loaded event has occurred.
-
Method Details
-
createAdEvents
Create ad events instance associated with the supplied ad session.- Parameters:
adSession
- associated with the ad events- Returns:
- new ad events instance associated with the supplied ad session.
- Throws:
IllegalArgumentException
- if the supplied ad session is null.IllegalStateException
- if an ad events instance has already been registered with the ad session.
-
impressionOccurred
public void impressionOccurred()Notify the ad session that an impression event has occurred. When triggered all registered verification providers will be notified of this event. NOTE: the ad session will be automatically started if this method has been called first.- Throws:
IllegalStateException
- if the ad session configuration identifies JAVASCRIPT as the impression ownerIllegalStateException
- if the impression event has already been publishedIllegalStateException
- if the session has already been finished
-
loaded
public void loaded()Notify the ad session that a display loaded event has occurred. When triggered all registered verification providers will be notified of this event.- Throws:
IllegalStateException
- if the ad session configuration identifies JAVASCRIPT as the impression ownerIllegalStateException
- if the loaded event has already been publishedIllegalStateException
- if the session has not yet startedIllegalStateException
- if the session has already been finished
-
loaded
Notify the ad session that a video/audio loaded event has occurred. When triggered all registered verification providers will be notified of this event.- Parameters:
vastProperties
- contains static information about the video/audio placement.- Throws:
IllegalArgumentException
- if the supplied vastProperties is null.IllegalStateException
- if the ad session configuration identifies JAVASCRIPT as the impression ownerIllegalStateException
- if the loaded event has already been publishedIllegalStateException
- if the session has not yet startedIllegalStateException
- if the session has already been finished
-