Class CronetDataSourceFactory
- java.lang.Object
-
- com.google.android.exoplayer2.upstream.HttpDataSource.BaseFactory
-
- com.google.android.exoplayer2.ext.cronet.CronetDataSourceFactory
-
- All Implemented Interfaces:
DataSource.Factory
,HttpDataSource.Factory
@Deprecated public final class CronetDataSourceFactory extends HttpDataSource.BaseFactory
Deprecated.UseCronetDataSource.Factory
instead.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CONNECT_TIMEOUT_MILLIS
Deprecated.The default connection timeout, in milliseconds.static int
DEFAULT_READ_TIMEOUT_MILLIS
Deprecated.The default read timeout, in milliseconds.
-
Constructor Summary
Constructors Constructor Description CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor)
Deprecated.Creates an instance.CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, int connectTimeoutMs, int readTimeoutMs, boolean resetTimeoutOnRedirects, HttpDataSource.Factory fallbackFactory)
Deprecated.Creates an instance.CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, int connectTimeoutMs, int readTimeoutMs, boolean resetTimeoutOnRedirects, String userAgent)
Deprecated.Creates an instance.CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, HttpDataSource.Factory fallbackFactory)
Deprecated.Creates an instance.CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, TransferListener transferListener)
Deprecated.Creates an instance.CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, TransferListener transferListener, int connectTimeoutMs, int readTimeoutMs, boolean resetTimeoutOnRedirects, HttpDataSource.Factory fallbackFactory)
Deprecated.Creates an instance.CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, TransferListener transferListener, int connectTimeoutMs, int readTimeoutMs, boolean resetTimeoutOnRedirects, String userAgent)
Deprecated.Creates an instance.CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, TransferListener transferListener, HttpDataSource.Factory fallbackFactory)
Deprecated.Creates an instance.CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, TransferListener transferListener, String userAgent)
Deprecated.Creates an instance.CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, String userAgent)
Deprecated.Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected HttpDataSource
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
-
-
-
-
Field Detail
-
DEFAULT_CONNECT_TIMEOUT_MILLIS
public static final int DEFAULT_CONNECT_TIMEOUT_MILLIS
Deprecated.The default connection timeout, in milliseconds.- See Also:
- Constant Field Values
-
DEFAULT_READ_TIMEOUT_MILLIS
public static final int DEFAULT_READ_TIMEOUT_MILLIS
Deprecated.The default read timeout, in milliseconds.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CronetDataSourceFactory
public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, HttpDataSource.Factory fallbackFactory)
Deprecated.Creates an instance.If the
CronetEngineWrapper
fails to provide aCronetEngine
, the provided fallbackHttpDataSource.Factory
will be used instead.Sets
CronetDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS
as the connection timeout,CronetDataSource.DEFAULT_READ_TIMEOUT_MILLIS
as the read timeout.- Parameters:
cronetEngineWrapper
- ACronetEngineWrapper
.executor
- TheExecutor
that will perform the requests.fallbackFactory
- AHttpDataSource.Factory
which is used as a fallback in case no suitable CronetEngine can be build.
-
CronetDataSourceFactory
public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor)
Deprecated.Creates an instance.If the
CronetEngineWrapper
fails to provide aCronetEngine
, aDefaultHttpDataSource.Factory
will be used instead.Sets
CronetDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS
as the connection timeout,CronetDataSource.DEFAULT_READ_TIMEOUT_MILLIS
as the read timeout.- Parameters:
cronetEngineWrapper
- ACronetEngineWrapper
.executor
- TheExecutor
that will perform the requests.
-
CronetDataSourceFactory
public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, @Nullable String userAgent)
Deprecated.Creates an instance.If the
CronetEngineWrapper
fails to provide aCronetEngine
, aDefaultHttpDataSource.Factory
will be used instead.Sets
CronetDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS
as the connection timeout,CronetDataSource.DEFAULT_READ_TIMEOUT_MILLIS
as the read timeout.- Parameters:
cronetEngineWrapper
- ACronetEngineWrapper
.executor
- TheExecutor
that will perform the requests.userAgent
- The user agent that will be used by the fallbackHttpDataSource
if needed, ornull
for the fallback to use the default user agent of the underlying platform.
-
CronetDataSourceFactory
public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, int connectTimeoutMs, int readTimeoutMs, boolean resetTimeoutOnRedirects, @Nullable String userAgent)
Deprecated.Creates an instance.If the
CronetEngineWrapper
fails to provide aCronetEngine
, aDefaultHttpDataSource.Factory
will be used instead.- Parameters:
cronetEngineWrapper
- ACronetEngineWrapper
.executor
- TheExecutor
that will perform the requests.connectTimeoutMs
- The connection timeout, in milliseconds.readTimeoutMs
- The read timeout, in milliseconds.resetTimeoutOnRedirects
- Whether the connect timeout is reset when a redirect occurs.userAgent
- The user agent that will be used by the fallbackHttpDataSource
if needed, ornull
for the fallback to use the default user agent of the underlying platform.
-
CronetDataSourceFactory
public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, int connectTimeoutMs, int readTimeoutMs, boolean resetTimeoutOnRedirects, HttpDataSource.Factory fallbackFactory)
Deprecated.Creates an instance.If the
CronetEngineWrapper
fails to provide aCronetEngine
, the provided fallbackHttpDataSource.Factory
will be used instead.- Parameters:
cronetEngineWrapper
- ACronetEngineWrapper
.executor
- TheExecutor
that will perform the requests.connectTimeoutMs
- The connection timeout, in milliseconds.readTimeoutMs
- The read timeout, in milliseconds.resetTimeoutOnRedirects
- Whether the connect timeout is reset when a redirect occurs.fallbackFactory
- AHttpDataSource.Factory
which is used as a fallback in case no suitable CronetEngine can be build.
-
CronetDataSourceFactory
public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, @Nullable TransferListener transferListener, HttpDataSource.Factory fallbackFactory)
Deprecated.Creates an instance.If the
CronetEngineWrapper
fails to provide aCronetEngine
, the provided fallbackHttpDataSource.Factory
will be used instead.Sets
CronetDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS
as the connection timeout,CronetDataSource.DEFAULT_READ_TIMEOUT_MILLIS
as the read timeout.- Parameters:
cronetEngineWrapper
- ACronetEngineWrapper
.executor
- TheExecutor
that will perform the requests.transferListener
- An optional listener.fallbackFactory
- AHttpDataSource.Factory
which is used as a fallback in case no suitable CronetEngine can be build.
-
CronetDataSourceFactory
public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, @Nullable TransferListener transferListener)
Deprecated.Creates an instance.If the
CronetEngineWrapper
fails to provide aCronetEngine
, aDefaultHttpDataSource.Factory
will be used instead.Sets
CronetDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS
as the connection timeout,CronetDataSource.DEFAULT_READ_TIMEOUT_MILLIS
as the read timeout.- Parameters:
cronetEngineWrapper
- ACronetEngineWrapper
.executor
- TheExecutor
that will perform the requests.transferListener
- An optional listener.
-
CronetDataSourceFactory
public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, @Nullable TransferListener transferListener, @Nullable String userAgent)
Deprecated.Creates an instance.If the
CronetEngineWrapper
fails to provide aCronetEngine
, aDefaultHttpDataSource.Factory
will be used instead.Sets
CronetDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS
as the connection timeout,CronetDataSource.DEFAULT_READ_TIMEOUT_MILLIS
as the read timeout.- Parameters:
cronetEngineWrapper
- ACronetEngineWrapper
.executor
- TheExecutor
that will perform the requests.transferListener
- An optional listener.userAgent
- The user agent that will be used by the fallbackHttpDataSource
if needed, ornull
for the fallback to use the default user agent of the underlying platform.
-
CronetDataSourceFactory
public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, @Nullable TransferListener transferListener, int connectTimeoutMs, int readTimeoutMs, boolean resetTimeoutOnRedirects, @Nullable String userAgent)
Deprecated.Creates an instance.If the
CronetEngineWrapper
fails to provide aCronetEngine
, aDefaultHttpDataSource.Factory
will be used instead.- Parameters:
cronetEngineWrapper
- ACronetEngineWrapper
.executor
- TheExecutor
that will perform the requests.transferListener
- An optional listener.connectTimeoutMs
- The connection timeout, in milliseconds.readTimeoutMs
- The read timeout, in milliseconds.resetTimeoutOnRedirects
- Whether the connect timeout is reset when a redirect occurs.userAgent
- The user agent that will be used by the fallbackHttpDataSource
if needed, ornull
for the fallback to use the default user agent of the underlying platform.
-
CronetDataSourceFactory
public CronetDataSourceFactory(CronetEngineWrapper cronetEngineWrapper, Executor executor, @Nullable TransferListener transferListener, int connectTimeoutMs, int readTimeoutMs, boolean resetTimeoutOnRedirects, HttpDataSource.Factory fallbackFactory)
Deprecated.Creates an instance.If the
CronetEngineWrapper
fails to provide aCronetEngine
, the provided fallbackHttpDataSource.Factory
will be used instead.- Parameters:
cronetEngineWrapper
- ACronetEngineWrapper
.executor
- TheExecutor
that will perform the requests.transferListener
- An optional listener.connectTimeoutMs
- The connection timeout, in milliseconds.readTimeoutMs
- The read timeout, in milliseconds.resetTimeoutOnRedirects
- Whether the connect timeout is reset when a redirect occurs.fallbackFactory
- AHttpDataSource.Factory
which is used as a fallback in case no suitable CronetEngine can be build.
-
-
Method Detail
-
createDataSourceInternal
protected HttpDataSource 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.
-
-