Class AdResponseManager

  • All Implemented Interfaces:

    
    public abstract class AdResponseManager
    
                        

    AdResponseManager is an abstract class responsible for managing ad responses. This class manages to validate the fetch requests, then fetches the ad response from the subclass, parses the ad response and validates it. If any validation fails, it throws an AdFetchFailureException.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final AdResponse fetchAdResponse(Function1<AdFetchEvent, Unit> onFetchEvent) Fetches the ad response by validating the fetch request, retrieving the response string, parsing the response, and validating the parsed response and returns the AdResponse by calling onComplete lambda function.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • fetchAdResponse

         final AdResponse fetchAdResponse(Function1<AdFetchEvent, Unit> onFetchEvent)

        Fetches the ad response by validating the fetch request, retrieving the response string, parsing the response, and validating the parsed response and returns the AdResponse by calling onComplete lambda function.

        Parameters:
        onFetchEvent - Callback to be invoked with the ad fetch event.
        Returns:

        onComplete Callback to be invoked with the complete ad response.