com.bumptech.glide
Class GenericTranscodeRequest<ModelType,DataType,ResourceType>

java.lang.Object
  extended by com.bumptech.glide.GenericRequestBuilder<ModelType,DataType,ResourceType,ResourceType>
      extended by com.bumptech.glide.GenericTranscodeRequest<ModelType,DataType,ResourceType>
Type Parameters:
ModelType - The type of the model used to retrieve data.
DataType - The type of data retrieved.
ResourceType - The type of resource to be decoded from the the data.
All Implemented Interfaces:
Cloneable

public class GenericTranscodeRequest<ModelType,DataType,ResourceType>
extends GenericRequestBuilder<ModelType,DataType,ResourceType,ResourceType>

A class for handling requests to load a generic resource type or transcode the generic resource type into another generic resource type.

Warning - It is not safe to use this builder after calling into(), it may be pooled and reused.


Field Summary
 
Fields inherited from class com.bumptech.glide.GenericRequestBuilder
context, glide, lifecycle, modelClass, requestTracker, transcodeClass
 
Method Summary
 FutureTarget<File> downloadOnly(int width, int height)
          Loads the original unmodified data into the cache and returns a Future that can be used to retrieve the cache File containing the data.
<Y extends Target<File>>
Y
downloadOnly(Y target)
          Loads the original unmodified data into the cache and calls the given Target with the cache File.
<TranscodeType>
GenericRequestBuilder<ModelType,DataType,ResourceType,TranscodeType>
transcode(ResourceTranscoder<ResourceType,TranscodeType> transcoder, Class<TranscodeType> transcodeClass)
          Adds a transcoder to this request to transcode from the resource type to the given transcode type.
 
Methods inherited from class com.bumptech.glide.GenericRequestBuilder
animate, animate, animate, cacheDecoder, clone, decoder, diskCacheStrategy, dontAnimate, dontTransform, encoder, error, error, fallback, fallback, into, into, into, listener, load, override, placeholder, placeholder, preload, preload, priority, signature, sizeMultiplier, skipMemoryCache, sourceEncoder, thumbnail, thumbnail, transcoder, transform
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

transcode

public <TranscodeType> GenericRequestBuilder<ModelType,DataType,ResourceType,TranscodeType> transcode(ResourceTranscoder<ResourceType,TranscodeType> transcoder,
                                                                                                      Class<TranscodeType> transcodeClass)
Adds a transcoder to this request to transcode from the resource type to the given transcode type.

Type Parameters:
TranscodeType - The type of the resource that will be transcoded to.
Parameters:
transcoder - The transcoder to use.
transcodeClass - The class of the resource type that will be transcoded to.
Returns:
A new request builder to set options for the transcoded load.

downloadOnly

public <Y extends Target<File>> Y downloadOnly(Y target)
Loads the original unmodified data into the cache and calls the given Target with the cache File.

Type Parameters:
Y - The type of Target.
Parameters:
target - The Target that will receive the cache File when the load completes
Returns:
The given Target.

downloadOnly

public FutureTarget<File> downloadOnly(int width,
                                       int height)
Loads the original unmodified data into the cache and returns a Future that can be used to retrieve the cache File containing the data.

Parameters:
width - The width in pixels to use to fetch the data.
height - The height in pixels to use to fetch the data.
Returns:
A Future that can be used to retrieve the cache File containing the data.