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

java.lang.Object
  extended by com.bumptech.glide.provider.ChildLoadProvider<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 ChildLoadProvider<A,T,Z,R>
extends Object
implements LoadProvider<A,T,Z,R>

A LoadProvider that returns classes preferentially from those set on it but that also defaults to a wrapped LoadProvider when a particular class is not set.


Constructor Summary
ChildLoadProvider(LoadProvider<A,T,Z,R> parent)
           
 
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.
 void setCacheDecoder(ResourceDecoder<File,Z> cacheDecoder)
          Sets the ResourceDecoder to use for decoding the resource from the disk cache.
 void setEncoder(ResourceEncoder<Z> encoder)
          Sets the ResourceEncoder to use to write the decoded and transformed resource to the disk cache.
 void setSourceDecoder(ResourceDecoder<T,Z> sourceDecoder)
          Sets the ResourceDecoder to use to decoding the resource from the original data.
 void setSourceEncoder(Encoder<T> sourceEncoder)
          Sets the Encoder to use to write the original data to the disk cache.
 void setTranscoder(ResourceTranscoder<Z,R> transcoder)
          Sets the ResourceTranscoder to use to transcode the decoded resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChildLoadProvider

public ChildLoadProvider(LoadProvider<A,T,Z,R> parent)
Method Detail

getModelLoader

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

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

setCacheDecoder

public void setCacheDecoder(ResourceDecoder<File,Z> cacheDecoder)
Sets the ResourceDecoder to use for decoding the resource from the disk cache.

Parameters:
cacheDecoder - The decoder to use.

setSourceDecoder

public void setSourceDecoder(ResourceDecoder<T,Z> sourceDecoder)
Sets the ResourceDecoder to use to decoding the resource from the original data.

Parameters:
sourceDecoder - The decoder to use.

setEncoder

public void setEncoder(ResourceEncoder<Z> encoder)
Sets the ResourceEncoder to use to write the decoded and transformed resource to the disk cache.

Parameters:
encoder - The encoder to use.

setTranscoder

public void setTranscoder(ResourceTranscoder<Z,R> transcoder)
Sets the ResourceTranscoder to use to transcode the decoded resource.

Parameters:
transcoder - The transcoder to use.

setSourceEncoder

public void setSourceEncoder(Encoder<T> sourceEncoder)
Sets the Encoder to use to write the original data to the disk cache.

Parameters:
sourceEncoder - The encoder to use.

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>

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>