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.
-
-
Field Summary
Fields Modifier and Type Field Description private final ContextapplicationContextprivate final AdManagerContextadManagerContextprivate final CoroutineScopeadManagerScopeprivate final AdConfigadConfigprivate final PubSettingspubSettingsprivate final InMobiLoggerloggerprivate final AdLifecycleDataadLifecycleDataprivate final AdManagerTelemetryHelperadManagerTelemetryHelper
-
Constructor Summary
Constructors Constructor Description CreatedState(AdManagerComponent adManagerComponent, PublisherCallbacks publisherCallbacks, AUMStateMachine stateMachine)
-
Method Summary
Modifier and Type Method Description final Unitfetch(Boolean isPreload)Initiates an ad fetch operation. final Unitload(ByteArray response)Loads an ad from the provided response data. -
Methods inherited from class com.inmobi.media.ads.context.wrapper.AdManagerComponentWrapper
getAdConfig, getAdLifecycleData, getAdManagerContext, getAdManagerScope, getAdManagerTelemetryHelper, getApplicationContext, getLogger, getPubSettings -
Methods inherited from class com.inmobi.media.ads.common.base.state.State
cleanUp, initialize -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CreatedState
CreatedState(AdManagerComponent adManagerComponent, PublisherCallbacks publisherCallbacks, AUMStateMachine stateMachine)
-
-
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
-
-
-
-