com.bumptech.glide.provider
Class FixedLoadProvider<A,T,Z,R>

java.lang.Object
  extended by com.bumptech.glide.provider.FixedLoadProvider<A,T,Z,R>
Type Parameters:
A - The type of the model the resource will be loaded from.
T - The type of the data that will be retrieved for the model.
Z - The type of the resource that will be decoded from the data.
R - The type of the resource that will be transcoded from the decoded resource.
All Implemented Interfaces:
DataLoadProvider<T,Z>, LoadProvider<A,T,Z,R>

public class FixedLoadProvider<A,T,Z,R>
extends Object
implements LoadProvider<A,T,Z,R>

A LoadProvider that sets the classes it provides using non null arguments in its constructor.


Constructor Summary
FixedLoadProvider(ModelLoader<A,T> modelLoader, ResourceTranscoder<Z,R> transcoder, DataLoadProvider<T,Z> dataLoadProvider)
           
 
Method Summary
 ResourceDecoder<File,Z> getCacheDecoder()
          Returns the ResourceDecoder to use to decode the resource from the disk cache.
 ResourceEncoder<Z> getEncoder()
          Returns the ResourceEncoder to use to write the decoded and transformed resource to the disk cache.
 ModelLoader<A,T> getModelLoader()
          Returns the ModelLoader to convert from the given model to a data type.
 ResourceDecoder<T,Z> getSourceDecoder()
          Returns the ResourceDecoder to use to decode the resource from the original data.
 Encoder<T> getSourceEncoder()
          Returns the Encoder to use to write the original data to the disk cache.
 ResourceTranscoder<Z,R> getTranscoder()
          Returns the ResourceTranscoder to convert from the decoded and transformed resource into the transcoded resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedLoadProvider

public FixedLoadProvider(ModelLoader<A,T> modelLoader,
                         ResourceTranscoder<Z,R> transcoder,
                         DataLoadProvider<T,Z> dataLoadProvider)
Method Detail

getModelLoader

public ModelLoader<A,T> getModelLoader()
Returns the ModelLoader to convert from the given model to a data type.

Specified by:
getModelLoader in interface LoadProvider<A,T,Z,R>

getTranscoder

public ResourceTranscoder<Z,R> getTranscoder()
Returns the ResourceTranscoder to convert from the decoded and transformed resource into the transcoded resource.

Specified by:
getTranscoder in interface LoadProvider<A,T,Z,R>

getCacheDecoder

public ResourceDecoder<File,Z> getCacheDecoder()
Returns the ResourceDecoder to use to decode the resource from the disk cache.

Specified by:
getCacheDecoder in interface DataLoadProvider<T,Z>

getSourceDecoder

public ResourceDecoder<T,Z> getSourceDecoder()
Returns the ResourceDecoder to use to decode the resource from the original data.

Specified by:
getSourceDecoder in interface DataLoadProvider<T,Z>

getSourceEncoder

public Encoder<T> getSourceEncoder()
Returns the Encoder to use to write the original data to the disk cache.

Specified by:
getSourceEncoder in interface DataLoadProvider<T,Z>

getEncoder

public ResourceEncoder<Z> getEncoder()
Returns the ResourceEncoder to use to write the decoded and transformed resource to the disk cache.

Specified by:
getEncoder in interface DataLoadProvider<T,Z>