Package com.bumptech.glide.request
Interface RequestCoordinator
- All Known Implementing Classes:
ErrorRequestCoordinator,ThumbnailRequestCoordinator
public interface RequestCoordinator
An interface for coordinating multiple requests with the same
Target.
To avoid deadlock, implemenations must not call into individual Requests to
determine their state (ie do not call Request.isCleared() or Request.isRunning()
etc). Instead use RequestCoordinator.RequestState and the various methods available on this interface and
Request to track states manually.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumA simple state enum to keep track of the states of individual subrequests. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanNotifyCleared(Request request) booleancanNotifyStatusChanged(Request request) Returns true if theRequestcan display a placeholder.booleancanSetImage(Request request) Returns true if theRequestcan display a loaded bitmap.getRoot()Returns the top most parentRequestCoordinator.booleanReturns true if any coordinatedRequesthas successfully completed.voidonRequestFailed(Request request) Must be called when aRequestcoordinated by this object fails.voidonRequestSuccess(Request request) Must be called when aRequestcoordinated by this object completes successfully.
-
Method Details
-
canSetImage
Returns true if theRequestcan display a loaded bitmap.- Parameters:
request- TheRequestrequesting permission to display a bitmap.
-
canNotifyStatusChanged
Returns true if theRequestcan display a placeholder.- Parameters:
request- TheRequestrequesting permission to display a placeholder.
-
canNotifyCleared
-
isAnyResourceSet
boolean isAnyResourceSet()Returns true if any coordinatedRequesthas successfully completed.- See Also:
-
onRequestSuccess
Must be called when aRequestcoordinated by this object completes successfully. -
onRequestFailed
Must be called when aRequestcoordinated by this object fails. -
getRoot
RequestCoordinator getRoot()Returns the top most parentRequestCoordinator.
-