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.
-
-
Field Summary
Fields Modifier and Type Field Description private final ContextapplicationContextprivate final CoroutineScopeadManagerScopeprivate final AdContextadContextprivate final AdConfigadConfigprivate final PubSettingspubSettingsprivate final AdContext.ViewabilityContextviewabilityprivate final AdMetaInfoadMetaInfoprivate final MetaInfometaInfoprivate final InMobiLoggerloggerprivate final AdLifecycleDataadLifecycleDataprivate final AdManagerTelemetryHelperadManagerTelemetryHelper
-
Constructor Summary
Constructors Constructor Description FetchedState(AdComponent adComponent, AdUnitTimeoutManager adUnitTimeout, PublisherCallbacks publisherCallbacks, AUMStateMachine stateMachine)
-
Method Summary
Modifier and Type Method Description Unitinitialize()Initializes the fetched state and notifies the publisher of successful ad fetch. final Unitinflate()Initiates the ad inflation process. UnitonInternalLoadTimeout()Handles internal load timeout events during the fetch phase. UnitonDestroy()Handles destruction of the ad unit manager. -
Methods inherited from class com.inmobi.media.ads.context.wrapper.AdComponentWrapper
getAdConfig, getAdContext, getAdLifecycleData, getAdManagerScope, getAdManagerTelemetryHelper, getAdMetaInfo, getApplicationContext, getLogger, getMetaInfo, getPubSettings, getViewability -
Methods inherited from class com.inmobi.media.ads.common.base.state.State
cleanUp -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
FetchedState
FetchedState(AdComponent adComponent, AdUnitTimeoutManager adUnitTimeout, PublisherCallbacks publisherCallbacks, AUMStateMachine stateMachine)
-
-
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.
-
-
-
-