| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bumptech.glide.request.GenericRequest<A,T,Z,R>
A - The type of the model that the resource will be loaded from.T - The type of the data that the resource will be loaded from.Z - The type of the resource that will be loaded.R - The type of the resource that will be transcoded from the loaded resource.public final class GenericRequest<A,T,Z,R>
A Request that loads a Resource into a given Target.
| Method Summary | ||
|---|---|---|
|  void | begin()Starts an asynchronous load. | |
|  void | clear()Cancels the current load if it is in progress, clears any resources held onto by the request and replaces the loaded resource if the load completed with the placeholder. | |
|  boolean | isCancelled()Returns true if the request has been cancelled. | |
|  boolean | isComplete()Returns true if the request has completed successfully. | |
|  boolean | isFailed()Returns true if the request has failed. | |
|  boolean | isPaused()Returns true if this request is paused and may be restarted. | |
|  boolean | isResourceSet()Returns true if a non-placeholder resource is set. | |
|  boolean | isRunning()Returns true if this request is running and has not completed or failed. | |
| static
 | obtain(LoadProvider<A,T,Z,R> loadProvider,
       A model,
       Key signature,
       Context context,
       Priority priority,
       Target<R> target,
       float sizeMultiplier,
       Drawable placeholderDrawable,
       int placeholderResourceId,
       Drawable errorDrawable,
       int errorResourceId,
       Drawable fallbackDrawable,
       int fallbackResourceId,
       RequestListener<? super A,R> requestListener,
       RequestCoordinator requestCoordinator,
       Engine engine,
       Transformation<Z> transformation,
       Class<R> transcodeClass,
       boolean isMemoryCacheable,
       GlideAnimationFactory<R> animationFactory,
       int overrideWidth,
       int overrideHeight,
       DiskCacheStrategy diskCacheStrategy) | |
|  void | onException(Exception e)A callback method that should never be invoked directly. | |
|  void | onResourceReady(Resource<?> resource)A callback method that should never be invoked directly. | |
|  void | onSizeReady(int width,
            int height)A callback method that should never be invoked directly. | |
|  void | pause()Identical to Request.clear()except that the request may later be restarted. | |
|  void | recycle()Recycles the request object and releases its resources. | |
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static <A,T,Z,R> GenericRequest<A,T,Z,R> obtain(LoadProvider<A,T,Z,R> loadProvider,
                                                       A model,
                                                       Key signature,
                                                       Context context,
                                                       Priority priority,
                                                       Target<R> target,
                                                       float sizeMultiplier,
                                                       Drawable placeholderDrawable,
                                                       int placeholderResourceId,
                                                       Drawable errorDrawable,
                                                       int errorResourceId,
                                                       Drawable fallbackDrawable,
                                                       int fallbackResourceId,
                                                       RequestListener<? super A,R> requestListener,
                                                       RequestCoordinator requestCoordinator,
                                                       Engine engine,
                                                       Transformation<Z> transformation,
                                                       Class<R> transcodeClass,
                                                       boolean isMemoryCacheable,
                                                       GlideAnimationFactory<R> animationFactory,
                                                       int overrideWidth,
                                                       int overrideHeight,
                                                       DiskCacheStrategy diskCacheStrategy)
public void recycle()
Request
recycle in interface Requestpublic void begin()
begin in interface Requestpublic void clear()
     Cleared requests can be restarted with a subsequent call to begin()
 
clear in interface Requestcancel()public boolean isPaused()
Request
isPaused in interface Requestpublic void pause()
RequestRequest.clear() except that the request may later be restarted.
pause in interface Requestpublic boolean isRunning()
isRunning in interface Requestpublic boolean isComplete()
isComplete in interface Requestpublic boolean isResourceSet()
Request.isComplete()} returns false.
isResourceSet in interface Requestpublic boolean isCancelled()
isCancelled in interface Requestpublic boolean isFailed()
isFailed in interface Request
public void onSizeReady(int width,
                        int height)
onSizeReady in interface SizeReadyCallbackwidth - The width in pixels of the target, or Target.SIZE_ORIGINAL to indicate that we want the
              resource at its original width.height - The height in pixels of the target, or Target.SIZE_ORIGINAL to indicate that we want the
               resource at its original height.public void onResourceReady(Resource<?> resource)
onResourceReady in interface ResourceCallbackresource - The loaded resource.public void onException(Exception e)
onException in interface ResourceCallbacke - The exception that caused the failure, or null it the load failed for some reason other than an
          exception.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||