Object AdResponseValidator
-
- All Implemented Interfaces:
public class AdResponseValidatorAdResponseValidatoris responsible for validating ad responses received from the network. It ensures that the ad response contains valid ad sets and ads, and throws anAdFetchFailureExceptionif any validation fails. It also triggers appropriate fetch events based on the validation results.
-
-
Field Summary
Fields Modifier and Type Field Description public final static AdResponseValidatorINSTANCE
-
Method Summary
Modifier and Type Method Description final UnitvalidateAdResponse(AdResponse adResponse, InMobiLogger logger, Function1<AdFetchEvent, Unit> onFetchEvent)Validates the ad response received from the network. -
-
Method Detail
-
validateAdResponse
final Unit validateAdResponse(AdResponse adResponse, InMobiLogger logger, Function1<AdFetchEvent, Unit> onFetchEvent)
Validates the ad response received from the network. It checks if the ad response contains valid ad sets and ads. If any validation fails, it throws an
AdFetchFailureException. It also triggers appropriate fetch events based on the validation results.- Parameters:
adResponse- The ad response received from the network.onFetchEvent- Callback to be invoked with the ad fetch event.
-
-
-
-