Class FetchedState

  • All Implemented Interfaces:
    com.inmobi.media.ads.common.base.state.State , com.inmobi.media.ads.common.listeners.AUMDestroyListener , com.inmobi.media.ads.common.listeners.InternalLoadTimeoutListener

    
    public abstract class FetchedState
    extends AdComponentWrapper implements State, InternalLoadTimeoutListener, AUMDestroyListener
                        

    Represents the state when an ad has been successfully fetched and is ready for inflation.

    This abstract state indicates that the ad fetch operation completed successfully and the ad content is available for rendering. It notifies the publisher of fetch success, handles inflation requests, and manages timeout scenarios. The state can transition to LoadingState upon inflation or to LoadFailedState if timeouts occur.

    • Method Detail

      • initialize

         Unit initialize()

        Initializes the fetched state and notifies the publisher of successful ad fetch.

        This method marks the fetch as successful in the timeout manager, submits telemetry for parse success, and notifies the publisher callbacks about the successful ad fetch operation.

      • inflate

         final Unit inflate()

        Initiates the ad inflation process.

        This method is called when the publisher requests to inflate (render) the ad. It transitions to the appropriate loading state for the ad type.

      • onInternalLoadTimeout

         Unit onInternalLoadTimeout()

        Handles internal load timeout events during the fetch phase.

        If a timeout occurs while in the fetched state, this method transitions to LoadFailedState with appropriate timeout error codes.

      • onDestroy

         Unit onDestroy()

        Handles destruction of the ad unit manager.

        Transitions to DestroyedState for proper cleanup, preserving the ad unit timeout for final cleanup operations.