Class FetchFailedState
-
- All Implemented Interfaces:
-
com.inmobi.media.ads.common.base.state.State,com.inmobi.media.ads.common.listeners.AUMDestroyListener
public final class FetchFailedState extends BaseFailedState implements AUMDestroyListener
Represents the state when an ad fetch operation has failed.
This state extends BaseFailedState to handle failures that occur during the ad fetching process. It notifies the publisher of the fetch failure, submits telemetry data about the server error, and initiates cleanup procedures. The state provides detailed error information through telemetry payload and status codes for debugging and monitoring.
-
-
Field Summary
Fields Modifier and Type Field Description private final Map<String, Object>payloadprivate final InMobiAdRequestStatusinMobiAdRequestStatus
-
Constructor Summary
Constructors Constructor Description FetchFailedState(Map<String, Object> payload, InMobiAdRequestStatus inMobiAdRequestStatus, AdUnitTimeoutManager adUnitTimeout, AdManagerComponent adManagerComponent, PublisherCallbacks publisherCallbacks, AUMStateMachine stateMachine)
-
Method Summary
Modifier and Type Method Description final Map<String, Object>getPayload()The telemetry payload containing detailed error information final InMobiAdRequestStatusgetInMobiAdRequestStatus()The InMobiAdRequestStatus describing the fetch failure Unitinitialize()Initializes the fetch failed 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
-
FetchFailedState
FetchFailedState(Map<String, Object> payload, InMobiAdRequestStatus inMobiAdRequestStatus, AdUnitTimeoutManager adUnitTimeout, AdManagerComponent adManagerComponent, PublisherCallbacks publisherCallbacks, AUMStateMachine stateMachine)
- Parameters:
adUnitTimeout- The AdUnitTimeoutManager for managing timeouts during cleanupadManagerComponent- The AdManagerComponent providing necessary dependenciespublisherCallbacks- The PublisherCallbacks for notifying the publisher of the failurestateMachine- The AUMStateMachine managing state transitions
-
-
Method Detail
-
getPayload
final Map<String, Object> getPayload()
The telemetry payload containing detailed error information
-
getInMobiAdRequestStatus
final InMobiAdRequestStatus getInMobiAdRequestStatus()
The InMobiAdRequestStatus describing the fetch failure
-
initialize
Unit initialize()
Initializes the fetch failed state and handles failure notifications.
This method performs the following operations:
Logs the failure details including payload and status information
Notifies the publisher callbacks about the ad fetch failure
Submits server error telemetry with the payload details
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.
-
-
-
-