Class CreatedState

  • All Implemented Interfaces:
    com.inmobi.media.ads.common.base.state.State

    
    public abstract class CreatedState
    extends AdManagerComponentWrapper implements State
                        

    Represents the initial state of an ad unit manager after creation.

    This abstract state is the starting point for ad unit operations. It handles both fetch and load requests, performs dependency validation, and transitions to either FetchingState, LoadResponseState, or LoadDroppedState based on the operation type and validation results. The state ensures all required dependencies (like CustomTabsClient) are available before proceeding with ad operations.

    • Method Detail

      • fetch

         final Unit fetch(Boolean isPreload)

        Initiates an ad fetch operation.

        This method validates dependencies and creates an AdUnitTimeoutManager before transitioning to the fetching state. If dependencies are missing, it transitions to a failed state instead.

        Parameters:
        isPreload - Whether this is a preload operation
      • load

         final Unit load(ByteArray response)

        Loads an ad from the provided response data.

        This method validates dependencies and creates an AdUnitTimeoutManager before transitioning to the load response state. If dependencies are missing or response is invalid, it transitions to a failed state instead.

        Parameters:
        response - The ad response data as a ByteArray, or null