docs/doc/reference/com/google/android/exoplayer2/ext/cronet/CronetDataSourceFactory.html
Package com.google.android.exoplayer2.ext.cronet
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 classCronetDataSourceFactoryextends[HttpDataSource.BaseFactory](../../upstream/HttpDataSource.BaseFactory.html "class in com.google.android.exoplayer2.upstream")
Deprecated.
Use CronetDataSource.Factory instead.
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. |
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. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| protected HttpDataSource | 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 static final int DEFAULT_CONNECT_TIMEOUT_MILLIS
Deprecated.
The default connection timeout, in milliseconds. See Also:Constant Field Values
-
public static final int DEFAULT_READ_TIMEOUT_MILLIS
Deprecated.
The default read timeout, in milliseconds. See Also:Constant Field Values
-
public CronetDataSourceFactory([CronetEngineWrapper](CronetEngineWrapper.html "class in com.google.android.exoplayer2.ext.cronet")cronetEngineWrapper,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor,[HttpDataSource.Factory](../../upstream/HttpDataSource.Factory.html "interface in com.google.android.exoplayer2.upstream")fallbackFactory)
Deprecated.
Creates an instance.
If the CronetEngineWrapper fails to provide a CronetEngine, the provided fallback HttpDataSource.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 - A CronetEngineWrapper.executor - The Executor that will perform the requests.fallbackFactory - A HttpDataSource.Factory which is used as a fallback in case no suitable CronetEngine can be build.
-
public CronetDataSourceFactory([CronetEngineWrapper](CronetEngineWrapper.html "class in com.google.android.exoplayer2.ext.cronet")cronetEngineWrapper,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor)
Deprecated.
Creates an instance.
If the CronetEngineWrapper fails to provide a CronetEngine, a DefaultHttpDataSource.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 - A CronetEngineWrapper.executor - The Executor that will perform the requests.
-
public CronetDataSourceFactory([CronetEngineWrapper](CronetEngineWrapper.html "class in com.google.android.exoplayer2.ext.cronet")cronetEngineWrapper,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent)
Deprecated.
Creates an instance.
If the CronetEngineWrapper fails to provide a CronetEngine, a DefaultHttpDataSource.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 - A CronetEngineWrapper.executor - The Executor that will perform the requests.userAgent - The user agent that will be used by the fallback HttpDataSource if needed, or null for the fallback to use the default user agent of the underlying platform.
-
public CronetDataSourceFactory([CronetEngineWrapper](CronetEngineWrapper.html "class in com.google.android.exoplayer2.ext.cronet")cronetEngineWrapper,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor,
int connectTimeoutMs,
int readTimeoutMs,
boolean resetTimeoutOnRedirects,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent)
Deprecated.
Creates an instance.
If the CronetEngineWrapper fails to provide a CronetEngine, a DefaultHttpDataSource.Factory will be used instead.
Parameters:cronetEngineWrapper - A CronetEngineWrapper.executor - The Executor 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 fallback HttpDataSource if needed, or null for the fallback to use the default user agent of the underlying platform.
-
public CronetDataSourceFactory([CronetEngineWrapper](CronetEngineWrapper.html "class in com.google.android.exoplayer2.ext.cronet")cronetEngineWrapper,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor,
int connectTimeoutMs,
int readTimeoutMs,
boolean resetTimeoutOnRedirects,[HttpDataSource.Factory](../../upstream/HttpDataSource.Factory.html "interface in com.google.android.exoplayer2.upstream")fallbackFactory)
Deprecated.
Creates an instance.
If the CronetEngineWrapper fails to provide a CronetEngine, the provided fallback HttpDataSource.Factory will be used instead.
Parameters:cronetEngineWrapper - A CronetEngineWrapper.executor - The Executor 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 - A HttpDataSource.Factory which is used as a fallback in case no suitable CronetEngine can be build.
-
public CronetDataSourceFactory([CronetEngineWrapper](CronetEngineWrapper.html "class in com.google.android.exoplayer2.ext.cronet")cronetEngineWrapper,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor,
@Nullable[TransferListener](../../upstream/TransferListener.html "interface in com.google.android.exoplayer2.upstream")transferListener,[HttpDataSource.Factory](../../upstream/HttpDataSource.Factory.html "interface in com.google.android.exoplayer2.upstream")fallbackFactory)
Deprecated.
Creates an instance.
If the CronetEngineWrapper fails to provide a CronetEngine, the provided fallback HttpDataSource.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 - A CronetEngineWrapper.executor - The Executor that will perform the requests.transferListener - An optional listener.fallbackFactory - A HttpDataSource.Factory which is used as a fallback in case no suitable CronetEngine can be build.
-
public CronetDataSourceFactory([CronetEngineWrapper](CronetEngineWrapper.html "class in com.google.android.exoplayer2.ext.cronet")cronetEngineWrapper,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor,
@Nullable[TransferListener](../../upstream/TransferListener.html "interface in com.google.android.exoplayer2.upstream")transferListener)
Deprecated.
Creates an instance.
If the CronetEngineWrapper fails to provide a CronetEngine, a DefaultHttpDataSource.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 - A CronetEngineWrapper.executor - The Executor that will perform the requests.transferListener - An optional listener.
-
public CronetDataSourceFactory([CronetEngineWrapper](CronetEngineWrapper.html "class in com.google.android.exoplayer2.ext.cronet")cronetEngineWrapper,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor,
@Nullable[TransferListener](../../upstream/TransferListener.html "interface in com.google.android.exoplayer2.upstream")transferListener,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent)
Deprecated.
Creates an instance.
If the CronetEngineWrapper fails to provide a CronetEngine, a DefaultHttpDataSource.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 - A CronetEngineWrapper.executor - The Executor that will perform the requests.transferListener - An optional listener.userAgent - The user agent that will be used by the fallback HttpDataSource if needed, or null for the fallback to use the default user agent of the underlying platform.
-
public CronetDataSourceFactory([CronetEngineWrapper](CronetEngineWrapper.html "class in com.google.android.exoplayer2.ext.cronet")cronetEngineWrapper,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor,
@Nullable[TransferListener](../../upstream/TransferListener.html "interface in com.google.android.exoplayer2.upstream")transferListener,
int connectTimeoutMs,
int readTimeoutMs,
boolean resetTimeoutOnRedirects,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent)
Deprecated.
Creates an instance.
If the CronetEngineWrapper fails to provide a CronetEngine, a DefaultHttpDataSource.Factory will be used instead.
Parameters:cronetEngineWrapper - A CronetEngineWrapper.executor - The Executor 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 fallback HttpDataSource if needed, or null for the fallback to use the default user agent of the underlying platform.
-
public CronetDataSourceFactory([CronetEngineWrapper](CronetEngineWrapper.html "class in com.google.android.exoplayer2.ext.cronet")cronetEngineWrapper,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor,
@Nullable[TransferListener](../../upstream/TransferListener.html "interface in com.google.android.exoplayer2.upstream")transferListener,
int connectTimeoutMs,
int readTimeoutMs,
boolean resetTimeoutOnRedirects,[HttpDataSource.Factory](../../upstream/HttpDataSource.Factory.html "interface in com.google.android.exoplayer2.upstream")fallbackFactory)
Deprecated.
Creates an instance.
If the CronetEngineWrapper fails to provide a CronetEngine, the provided fallback HttpDataSource.Factory will be used instead.
Parameters:cronetEngineWrapper - A CronetEngineWrapper.executor - The Executor 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 - A HttpDataSource.Factory which is used as a fallback in case no suitable CronetEngine can be build.
-
protected[HttpDataSource](../../upstream/HttpDataSource.html "interface in com.google.android.exoplayer2.upstream")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.