Package com.google.android.exoplayer2.upstream

## Class DefaultHttpDataSourceFactory

- java.lang.Object
- - com.google.android.exoplayer2.upstream.HttpDataSource.BaseFactory
  - - com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory

- All Implemented Interfaces:
    `DataSource.Factory`, `HttpDataSource.Factory`

      @Deprecated
      public final class DefaultHttpDataSourceFactory
      extends HttpDataSource.BaseFactory

  Deprecated.
  Use `DefaultHttpDataSource.Factory` instead.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultHttpDataSourceFactory()` | Deprecated. Creates an instance.
    `DefaultHttpDataSourceFactory​(String userAgent)` | Deprecated. Creates an instance.
    `DefaultHttpDataSourceFactory​(String userAgent, int connectTimeoutMillis, int readTimeoutMillis, boolean allowCrossProtocolRedirects)` | Deprecated.
    `DefaultHttpDataSourceFactory​(String userAgent, TransferListener listener)` | Deprecated. Creates an instance.
    `DefaultHttpDataSourceFactory​(String userAgent, TransferListener listener, int connectTimeoutMillis, int readTimeoutMillis, boolean allowCrossProtocolRedirects)` | Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected DefaultHttpDataSource` | `createDataSourceInternal​(HttpDataSource.RequestProperties defaultRequestProperties)` | Deprecated. Called by `HttpDataSource.BaseFactory.createDataSource()` to create a `HttpDataSource` instance.

    - ### Methods inherited from class com.google.android.exoplayer2.upstream.HttpDataSource.BaseFactory

      `createDataSource, getDefaultRequestProperties, setDefaultRequestProperties`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultHttpDataSourceFactory

          public DefaultHttpDataSourceFactory()

      Deprecated.
      Creates an instance. Sets `DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS` as the connection timeout, `DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS` as the read timeout and disables cross-protocol redirects.

    - #### DefaultHttpDataSourceFactory

          public DefaultHttpDataSourceFactory​(@Nullable
                                              String userAgent)

      Deprecated.
      Creates an instance. Sets `DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS` as the connection timeout, `DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS` as the read timeout and disables cross-protocol redirects.
      Parameters:
        `userAgent` - The user agent that will be used, or `null` to use the default user agent of the underlying platform.

    - #### DefaultHttpDataSourceFactory

          public DefaultHttpDataSourceFactory​(@Nullable
                                              String userAgent,
                                              @Nullable
                                              TransferListener listener)

      Deprecated.
      Creates an instance. Sets `DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS` as the connection timeout, `DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS` as the read timeout and disables cross-protocol redirects.
      Parameters:
        `userAgent` - The user agent that will be used, or `null` to use the default user agent of the underlying platform.
        `listener` - An optional listener.
      See Also:
        `DefaultHttpDataSourceFactory(String, TransferListener, int, int, boolean)`

    - #### DefaultHttpDataSourceFactory

          public DefaultHttpDataSourceFactory​(@Nullable
                                              String userAgent,
                                              int connectTimeoutMillis,
                                              int readTimeoutMillis,
                                              boolean allowCrossProtocolRedirects)

      Deprecated.
      Parameters:
        `userAgent` - The user agent that will be used, or `null` to use the default user agent of the underlying platform.
        `connectTimeoutMillis` - The connection timeout that should be used when requesting remote data, in milliseconds. A timeout of zero is interpreted as an infinite timeout.
        `readTimeoutMillis` - The read timeout that should be used when requesting remote data, in milliseconds. A timeout of zero is interpreted as an infinite timeout.
        `allowCrossProtocolRedirects` - Whether cross-protocol redirects (i.e. redirects from HTTP to HTTPS and vice versa) are enabled.

    - #### DefaultHttpDataSourceFactory

          public DefaultHttpDataSourceFactory​(@Nullable
                                              String userAgent,
                                              @Nullable
                                              TransferListener listener,
                                              int connectTimeoutMillis,
                                              int readTimeoutMillis,
                                              boolean allowCrossProtocolRedirects)

      Deprecated.
      Parameters:
        `userAgent` - The user agent that will be used, or `null` to use the default user agent of the underlying platform.
        `listener` - An optional listener.
        `connectTimeoutMillis` - The connection timeout that should be used when requesting remote data, in milliseconds. A timeout of zero is interpreted as an infinite timeout.
        `readTimeoutMillis` - The read timeout that should be used when requesting remote data, in milliseconds. A timeout of zero is interpreted as an infinite timeout.
        `allowCrossProtocolRedirects` - Whether cross-protocol redirects (i.e. redirects from HTTP to HTTPS and vice versa) are enabled.

  - ### Method Detail

    - #### createDataSourceInternal

          protected DefaultHttpDataSource createDataSourceInternal​(HttpDataSource.RequestProperties defaultRequestProperties)

      Deprecated.
      Description copied from class: `HttpDataSource.BaseFactory`
      Called by `HttpDataSource.BaseFactory.createDataSource()` to create a `HttpDataSource` instance.
      Specified by:
        `createDataSourceInternal` in class `HttpDataSource.BaseFactory`
      Parameters:
        `defaultRequestProperties` - The default `RequestProperties` to be used by the `HttpDataSource` instance.
      Returns:
        A `HttpDataSource` instance.