Package com.inmobi.ads.cache
Object WebResourceHandler
-
- All Implemented Interfaces:
public class WebResourceHandlerWebResourceHandler is responsible for handling web resource requests, including downloading and caching resources from the network.
-
-
Field Summary
Fields Modifier and Type Field Description private final LockingHashMap<String, Deferred<NetworkResponse>>ongoingRequestspublic final static WebResourceHandlerINSTANCE
-
Method Summary
Modifier and Type Method Description final WebResourceResponsegetAssetResponse(String url, InMobiLogger logger)Retrieves a web resource response from the cache or network. final BooleanisResponseValid(NetworkResponse $self)final UnitsetWebAssetLRUCacheHelper(WebAssetLRUCacheHelper webAssetLRUCacheHelper)final LockingHashMap<String, Deferred<NetworkResponse>>getOngoingRequests()-
-
Method Detail
-
getAssetResponse
final WebResourceResponse getAssetResponse(String url, InMobiLogger logger)
Retrieves a web resource response from the cache or network.
- Parameters:
url- The URL of the resource.logger- Optional logger for logging debug messages.- Returns:
The web resource response, or null if the resource could not be retrieved.
-
isResponseValid
final Boolean isResponseValid(NetworkResponse $self)
-
setWebAssetLRUCacheHelper
final Unit setWebAssetLRUCacheHelper(WebAssetLRUCacheHelper webAssetLRUCacheHelper)
-
getOngoingRequests
final LockingHashMap<String, Deferred<NetworkResponse>> getOngoingRequests()
-
-
-
-