Interface HttpDataSource.Factory
-
- All Superinterfaces:
DataSource.Factory
- All Known Implementing Classes:
CronetDataSource.Factory
,CronetDataSourceFactory
,DefaultHttpDataSource.Factory
,HttpDataSource.BaseFactory
,OkHttpDataSource.Factory
,OkHttpDataSourceFactory
- Enclosing interface:
- HttpDataSource
public static interface HttpDataSource.Factory extends DataSource.Factory
A factory forHttpDataSource
instances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HttpDataSource
createDataSource()
Creates aDataSource
instance.HttpDataSource.Factory
setDefaultRequestProperties(Map<String,String> defaultRequestProperties)
Sets the default request headers forHttpDataSource
instances created by the factory.
-
-
-
Method Detail
-
createDataSource
HttpDataSource createDataSource()
Description copied from interface:DataSource.Factory
Creates aDataSource
instance.- Specified by:
createDataSource
in interfaceDataSource.Factory
-
setDefaultRequestProperties
HttpDataSource.Factory setDefaultRequestProperties(Map<String,String> defaultRequestProperties)
Sets the default request headers forHttpDataSource
instances created by the factory.The new request properties will be used for future requests made by
HttpDataSources
created by the factory, including instances that have already been created. Modifying thedefaultRequestProperties
map after a call to this method will have no effect, and so it's necessary to call this method again each time the request properties need to be updated.- Parameters:
defaultRequestProperties
- The default request properties.- Returns:
- This factory.
-
-