Class LoadDroppedState
-
- All Implemented Interfaces:
-
com.inmobi.media.ads.common.base.state.State,com.inmobi.media.ads.common.listeners.AUMDestroyListener
public final class LoadDroppedState extends BaseFailedState implements AUMDestroyListener
Represents the state when an ad load operation has been dropped due to prerequisite failures.
This state extends BaseFailedState to handle cases where ad loading cannot proceed due to missing dependencies or other prerequisite conditions. It notifies the publisher of the fetch failure (as the load was dropped before attempting), submits telemetry data about the dropped load, and initiates cleanup procedures. This state typically occurs when required dependencies are missing or configuration issues prevent ad loading.
-
-
Field Summary
Fields Modifier and Type Field Description private final ShorterrorCodeprivate final InMobiAdRequestStatusstatus
-
Constructor Summary
Constructors Constructor Description LoadDroppedState(Short errorCode, InMobiAdRequestStatus status, AdUnitTimeoutManager adUnitTimeout, AdManagerComponent adManagerComponent, PublisherCallbacks publisherCallbacks, AUMStateMachine stateMachine)
-
Method Summary
Modifier and Type Method Description final ShortgetErrorCode()The TelemetryConstant.ErrorCode indicating the specific reason for dropping the load final InMobiAdRequestStatusgetStatus()The InMobiAdRequestStatus describing the failure condition Unitinitialize()Initializes the load dropped state and handles failure notifications. -
Methods inherited from class com.inmobi.media.ads.common.adUnitManager.state.states.BaseFailedState
onDestroy -
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
-
LoadDroppedState
LoadDroppedState(Short errorCode, InMobiAdRequestStatus status, AdUnitTimeoutManager adUnitTimeout, AdManagerComponent adManagerComponent, PublisherCallbacks publisherCallbacks, AUMStateMachine stateMachine)
- Parameters:
adUnitTimeout- The AdUnitTimeoutManager for managing timeouts during cleanup, may be nulladManagerComponent- The AdManagerComponent providing necessary dependenciespublisherCallbacks- The PublisherCallbacks for notifying the publisher of the failurestateMachine- The AUMStateMachine managing state transitions
-
-
Method Detail
-
getErrorCode
final Short getErrorCode()
The TelemetryConstant.ErrorCode indicating the specific reason for dropping the load
-
getStatus
final InMobiAdRequestStatus getStatus()
The InMobiAdRequestStatus describing the failure condition
-
initialize
Unit initialize()
Initializes the load dropped state and handles failure notifications.
This method performs the following operations:
Logs the failure details including error code and status information
Notifies the publisher callbacks about the ad fetch failure (since load was dropped)
Submits ad load dropped telemetry with the error code
Calls the parent initialization to trigger cleanup procedures
All publisher notifications are executed on the main thread to ensure proper UI thread execution for callback handling.
-
-
-
-