Class AdApiWrapper

java.lang.Object
com.castlabs.android.adverts.AdApiWrapper
All Implemented Interfaces:
AdApi

public final class AdApiWrapper extends Object implements AdApi
Wrapper around AdApi. The Wrapper outlives the internal AdApi.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an empty wrapper with no delegate assigned.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Perform the clickthrough operation on the current ad, if applicable.
    void
    setDelegate(AdApi delegate)
    Sets the delegate.
    void
    Request to skip the currently playing ad, if any, and skippable.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AdApiWrapper

      public AdApiWrapper()
      Creates an empty wrapper with no delegate assigned.
  • Method Details

    • setDelegate

      public void setDelegate(@Nullable AdApi delegate)
      Sets the delegate.
      Parameters:
      delegate - the delegate to set
    • skipAd

      public void skipAd()
      Description copied from interface: AdApi
      Request to skip the currently playing ad, if any, and skippable.
      Specified by:
      skipAd in interface AdApi
    • clickthrough

      public void clickthrough()
      Description copied from interface: AdApi
      Perform the clickthrough operation on the current ad, if applicable.
      Specified by:
      clickthrough in interface AdApi