Class OkHttpDataSourceFactory
- java.lang.Object
-
- com.google.android.exoplayer2.upstream.HttpDataSource.BaseFactory
-
- com.google.android.exoplayer2.ext.okhttp.OkHttpDataSourceFactory
-
- All Implemented Interfaces:
DataSource.Factory
,HttpDataSource.Factory
@Deprecated public final class OkHttpDataSourceFactory extends HttpDataSource.BaseFactory
Deprecated.UseOkHttpDataSource.Factory
instead.
-
-
Constructor Summary
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.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected OkHttpDataSource
createDataSourceInternal(HttpDataSource.RequestProperties defaultRequestProperties)
Deprecated.Called byHttpDataSource.BaseFactory.createDataSource()
to create aHttpDataSource
instance.-
Methods inherited from class com.google.android.exoplayer2.upstream.HttpDataSource.BaseFactory
createDataSource, setDefaultRequestProperties
-
-
-
-
Constructor Detail
-
OkHttpDataSourceFactory
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory)
Deprecated.Creates an instance.- Parameters:
callFactory
- ACall.Factory
(typically anOkHttpClient
) for use by the sources created by the factory.
-
OkHttpDataSourceFactory
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, @Nullable String userAgent)
Deprecated.Creates an instance.- Parameters:
callFactory
- ACall.Factory
(typically anOkHttpClient
) for use by the sources created by the factory.userAgent
- An optional User-Agent string.
-
OkHttpDataSourceFactory
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, @Nullable String userAgent, @Nullable okhttp3.CacheControl cacheControl)
Deprecated.Creates an instance.- Parameters:
callFactory
- ACall.Factory
(typically anOkHttpClient
) for use by the sources created by the factory.userAgent
- An optional User-Agent string.cacheControl
- An optionalCacheControl
for setting the Cache-Control header.
-
OkHttpDataSourceFactory
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, @Nullable String userAgent, @Nullable TransferListener listener)
Deprecated.Creates an instance.- Parameters:
callFactory
- ACall.Factory
(typically anOkHttpClient
) for use by the sources created by the factory.userAgent
- An optional User-Agent string.listener
- An optional listener.
-
OkHttpDataSourceFactory
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, @Nullable String userAgent, @Nullable TransferListener listener, @Nullable okhttp3.CacheControl cacheControl)
Deprecated.Creates an instance.- Parameters:
callFactory
- ACall.Factory
(typically anOkHttpClient
) for use by the sources created by the factory.userAgent
- An optional User-Agent string.listener
- An optional listener.cacheControl
- An optionalCacheControl
for setting the Cache-Control header.
-
-
Method Detail
-
createDataSourceInternal
protected OkHttpDataSource createDataSourceInternal(HttpDataSource.RequestProperties defaultRequestProperties)
Deprecated.Description copied from class:HttpDataSource.BaseFactory
Called byHttpDataSource.BaseFactory.createDataSource()
to create aHttpDataSource
instance.- Specified by:
createDataSourceInternal
in classHttpDataSource.BaseFactory
- Parameters:
defaultRequestProperties
- The defaultRequestProperties
to be used by theHttpDataSource
instance.- Returns:
- A
HttpDataSource
instance.
-
-