public abstract class AbstractAdListener extends java.lang.Object implements AdListener, InterstitialAdListener, ImpressionListener
AdListener
, InterstitialAdListener
and ImpressionListener
. The default implementation is to do nothing.
Instead of implementing all methods in those interfaces, client only overrides the methods handling desired events.Constructor and Description |
---|
AbstractAdListener() |
Modifier and Type | Method and Description |
---|---|
void |
onAdClicked(Ad ad)
Called when the ad control is clicked and user is redirected to the link in the ad.
|
void |
onAdLoaded(Ad ad)
Called when the ad control has loaded an ad.
|
void |
onError(Ad ad,
AdError error)
Called when an error happened while the ad control is attempting to load an ad.
|
void |
onInterstitialDismissed(Ad ad)
Called when the interstitial ad control is dismissed.
|
void |
onInterstitialDisplayed(Ad ad)
Called when the interstitial ad control is displayed.
|
void |
onLoggingImpression(Ad ad)
Called immediately before an impression is logged.
|
public void onError(Ad ad, AdError error)
onError
in interface AdListener
ad
- the ad controlerror
- the errorpublic void onAdLoaded(Ad ad)
onAdLoaded
in interface AdListener
ad
- the ad controlpublic void onAdClicked(Ad ad)
onAdClicked
in interface AdListener
ad
- the ad controlpublic void onInterstitialDisplayed(Ad ad)
onInterstitialDisplayed
in interface InterstitialAdListener
ad
- the ad controlpublic void onInterstitialDismissed(Ad ad)
onInterstitialDismissed
in interface InterstitialAdListener
ad
- the ad controlpublic void onLoggingImpression(Ad ad)
onLoggingImpression
in interface ImpressionListener
ad
- the ad control