com.bumptech.glide.request
Class ThumbnailRequestCoordinator

java.lang.Object
  extended by com.bumptech.glide.request.ThumbnailRequestCoordinator
All Implemented Interfaces:
Request, RequestCoordinator

public class ThumbnailRequestCoordinator
extends Object
implements RequestCoordinator, Request

A coordinator that coordinates two individual Requests that load a small thumbnail version of an image and the full size version of the image at the same time.


Constructor Summary
ThumbnailRequestCoordinator()
           
 
Method Summary
 void begin()
          Starts first the thumb request and then the full request.
 boolean canNotifyStatusChanged(Request request)
          Returns true if the request is the request loading the fullsize image and if neither the full nor the thumbnail image have completed sucessfully.
 boolean canSetImage(Request request)
          Returns true if the request is either the request loading the fullsize image or if the request loading the fullsize image has not yet completed.
 void clear()
          Prevents any bitmaps being loaded from previous requests, releases any resources held by this request and displays the current placeholder if one was provided.
 boolean isAnyRequestComplete()
          Returns true if either the full request has completed successfully or the thumb request has completed successfully.
 boolean isComplete()
          Returns true if the full request is complete.
 boolean isFailed()
          Returns true if the full request has failed.
 boolean isRunning()
          Returns true if the full request is still running.
 void recycle()
          Recycles the request object and releases its resources.
 void setRequests(Request full, Request thumb)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThumbnailRequestCoordinator

public ThumbnailRequestCoordinator()
Method Detail

setRequests

public void setRequests(Request full,
                        Request thumb)

canSetImage

public boolean canSetImage(Request request)
Returns true if the request is either the request loading the fullsize image or if the request loading the fullsize image has not yet completed.

Specified by:
canSetImage in interface RequestCoordinator
Parameters:
request - The Request requesting permission to display a bitmap.

canNotifyStatusChanged

public boolean canNotifyStatusChanged(Request request)
Returns true if the request is the request loading the fullsize image and if neither the full nor the thumbnail image have completed sucessfully.

Specified by:
canNotifyStatusChanged in interface RequestCoordinator
Parameters:
request - The Request requesting permission to display a placeholder..

isAnyRequestComplete

public boolean isAnyRequestComplete()
Returns true if either the full request has completed successfully or the thumb request has completed successfully.

Specified by:
isAnyRequestComplete in interface RequestCoordinator
See Also:
Request.isComplete()

begin

public void begin()
Starts first the thumb request and then the full request.

Specified by:
begin in interface Request

clear

public void clear()
Prevents any bitmaps being loaded from previous requests, releases any resources held by this request and displays the current placeholder if one was provided.

Specified by:
clear in interface Request

isRunning

public boolean isRunning()
Returns true if the full request is still running.

Specified by:
isRunning in interface Request

isComplete

public boolean isComplete()
Returns true if the full request is complete.

Specified by:
isComplete in interface Request

isFailed

public boolean isFailed()
Returns true if the full request has failed.

Specified by:
isFailed in interface Request

recycle

public void recycle()
Recycles the request object and releases its resources..

Specified by:
recycle in interface Request