Package com.bumptech.glide.request
Interface ResourceCallback
- All Known Implementing Classes:
SingleRequest
public interface ResourceCallback
A callback that listens for when a resource load completes successfully or fails due to an
exception.
-
Method Summary
Modifier and TypeMethodDescriptiongetLock()Returns the lock to use when notifying individual requests.voidCalled when a resource fails to load successfully.voidonResourceReady(Resource<?> resource, DataSource dataSource, boolean isLoadedFromAlternateCacheKey) Called when a resource is successfully loaded.
-
Method Details
-
onResourceReady
void onResourceReady(Resource<?> resource, DataSource dataSource, boolean isLoadedFromAlternateCacheKey) Called when a resource is successfully loaded.- Parameters:
resource- The loaded resource.
-
onLoadFailed
Called when a resource fails to load successfully.- Parameters:
e- a non-nullGlideException.
-
getLock
Object getLock()Returns the lock to use when notifying individual requests.
-