Class AdEvents

java.lang.Object
com.iab.omid.library.adsession.AdEvents

public final class AdEvents extends Object
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 Details

    • createAdEvents

      public static AdEvents createAdEvents(AdSession adSession)
      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 owner
      IllegalStateException - if the impression event has already been published
      IllegalStateException - 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 owner
      IllegalStateException - if the loaded event has already been published
      IllegalStateException - if the session has not yet started
      IllegalStateException - if the session has already been finished
    • loaded

      public void loaded(VastProperties vastProperties)
      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 owner
      IllegalStateException - if the loaded event has already been published
      IllegalStateException - if the session has not yet started
      IllegalStateException - if the session has already been finished