docs/doc/reference/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSourceFactory.html
Package com.google.android.exoplayer2.ext.okhttp
All Implemented Interfaces:DataSource.Factory, HttpDataSource.Factory
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classOkHttpDataSourceFactoryextends[HttpDataSource.BaseFactory](../../upstream/HttpDataSource.BaseFactory.html "class in com.google.android.exoplayer2.upstream")
Deprecated.
Use OkHttpDataSource.Factory instead.
Constructors | Constructor | Description |
| --- | --- |
| OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory) |
Deprecated.
Creates an instance.
|
| OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, String userAgent) |
Deprecated.
Creates an instance.
|
| OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, String userAgent, TransferListener listener) |
Deprecated.
Creates an instance.
|
| OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, String userAgent, TransferListener listener, okhttp3.CacheControl cacheControl) |
Deprecated.
Creates an instance.
|
| OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, String userAgent, okhttp3.CacheControl cacheControl) |
Deprecated.
Creates an instance. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| protected OkHttpDataSource | createDataSourceInternal(HttpDataSource.RequestProperties defaultRequestProperties) |
Deprecated.
Called by HttpDataSource.BaseFactory.createDataSource() to create a HttpDataSource instance.
|
-
createDataSource, setDefaultRequestProperties
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory)
Deprecated.
Creates an instance.
Parameters:callFactory - A Call.Factory (typically an OkHttpClient) for use by the sources created by the factory.
-
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent)
Deprecated.
Creates an instance.
Parameters:callFactory - A Call.Factory (typically an OkHttpClient) for use by the sources created by the factory.userAgent - An optional User-Agent string.
-
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent,
@Nullable
okhttp3.CacheControl cacheControl)
Deprecated.
Creates an instance.
Parameters:callFactory - A Call.Factory (typically an OkHttpClient) for use by the sources created by the factory.userAgent - An optional User-Agent string.cacheControl - An optional CacheControl for setting the Cache-Control header.
-
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent,
@Nullable[TransferListener](../../upstream/TransferListener.html "interface in com.google.android.exoplayer2.upstream")listener)
Deprecated.
Creates an instance.
Parameters:callFactory - A Call.Factory (typically an OkHttpClient) for use by the sources created by the factory.userAgent - An optional User-Agent string.listener - An optional listener.
-
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent,
@Nullable[TransferListener](../../upstream/TransferListener.html "interface in com.google.android.exoplayer2.upstream")listener,
@Nullable
okhttp3.CacheControl cacheControl)
Deprecated.
Creates an instance.
Parameters:callFactory - A Call.Factory (typically an OkHttpClient) for use by the sources created by the factory.userAgent - An optional User-Agent string.listener - An optional listener.cacheControl - An optional CacheControl for setting the Cache-Control header.
-
protected[OkHttpDataSource](OkHttpDataSource.html "class in com.google.android.exoplayer2.ext.okhttp")createDataSourceInternal([HttpDataSource.RequestProperties](../../upstream/HttpDataSource.RequestProperties.html "class in com.google.android.exoplayer2.upstream")defaultRequestProperties)
Deprecated.
Description copied from class: HttpDataSource.BaseFactory
Called by HttpDataSource.BaseFactory.createDataSource() to create a HttpDataSource instance.
Specified by:createDataSourceInternal in class HttpDataSource.BaseFactoryParameters:defaultRequestProperties - The default RequestProperties to be used by the HttpDataSource instance.Returns:A HttpDataSource instance.