Package com.bumptech.glide.load.model
Interface ModelLoaderFactory<T,Y>
- Type Parameters:
T- The type of the model theModelLoaders built by this factory can handleY- The type of data theModelLoaders built by this factory can load.
- All Known Implementing Classes:
AssetUriLoader.FileDescriptorFactory,AssetUriLoader.StreamFactory,ByteArrayLoader.ByteBufferFactory,ByteArrayLoader.StreamFactory,ByteBufferFileLoader.Factory,DataUrlLoader.StreamFactory,FileLoader.Factory,FileLoader.FileDescriptorFactory,FileLoader.StreamFactory,HttpGlideUrlLoader.Factory,HttpUriLoader.Factory,MediaStoreFileLoader.Factory,MediaStoreImageThumbLoader.Factory,MediaStoreVideoThumbLoader.Factory,QMediaStoreUriLoader.FileDescriptorFactory,QMediaStoreUriLoader.InputStreamFactory,ResourceLoader.AssetFileDescriptorFactory,ResourceLoader.FileDescriptorFactory,ResourceLoader.StreamFactory,ResourceLoader.UriFactory,StringLoader.AssetFileDescriptorFactory,StringLoader.FileDescriptorFactory,StringLoader.StreamFactory,UnitModelLoader.Factory,UriLoader.AssetFileDescriptorFactory,UriLoader.FileDescriptorFactory,UriLoader.StreamFactory,UrlLoader.StreamFactory,UrlUriLoader.StreamFactory
public interface ModelLoaderFactory<T,Y>
An interface for creating a
ModelLoader for a given model type.
The application Context can be passed in to the constructor of the
factory when necessary. It's unsafe to retain Activity Contexts in factories. The Context can be obtained from
LibraryGlideModule.registerComponents(Context, Glide, Registry)
in most cases.
-
Method Summary
Modifier and TypeMethodDescriptionbuild(MultiModelLoaderFactory multiFactory) Build a concrete ModelLoader for this model type.voidteardown()A lifecycle method that will be called when this factory is about to replaced.
-
Method Details
-
build
Build a concrete ModelLoader for this model type.- Parameters:
multiFactory- A map of classes to factories that can be used to construct additionalModelLoaders that this factory'sModelLoadermay depend on- Returns:
- A new
ModelLoader
-
teardown
void teardown()A lifecycle method that will be called when this factory is about to replaced.
-