Object AdResponseValidator

  • All Implemented Interfaces:

    
    public class AdResponseValidator
    
                        

    AdResponseValidator is responsible for validating ad responses received from the network. It ensures that the ad response contains valid ad sets and ads, and throws an AdFetchFailureException if any validation fails. It also triggers appropriate fetch events based on the validation results.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit validateAdResponse(AdResponse adResponse, InMobiLogger logger, Function1<AdFetchEvent, Unit> onFetchEvent) Validates the ad response received from the network.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.