public abstract class

HttpDataSource.BaseFactory

extends java.lang.Object

implements HttpDataSource.Factory

 java.lang.Object

↳androidx.media3.datasource.HttpDataSource.BaseFactory

Subclasses:

OkHttpDataSourceFactory, CronetDataSourceFactory

Overview

Base implementation of HttpDataSource.Factory that sets default request properties.

Summary

Constructors
publicBaseFactory()

Methods
public final HttpDataSourcecreateDataSource()

protected abstract HttpDataSourcecreateDataSourceInternal(HttpDataSource.RequestProperties defaultRequestProperties)

Called by HttpDataSource.BaseFactory.createDataSource() to create a HttpDataSource instance.

public final HttpDataSource.FactorysetDefaultRequestProperties(java.util.Map<java.lang.String, java.lang.String> defaultRequestProperties)

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public BaseFactory()

Methods

public final HttpDataSource createDataSource()

public final HttpDataSource.Factory setDefaultRequestProperties(java.util.Map<java.lang.String, java.lang.String> defaultRequestProperties)

protected abstract HttpDataSource createDataSourceInternal(HttpDataSource.RequestProperties defaultRequestProperties)

Called by HttpDataSource.BaseFactory.createDataSource() to create a HttpDataSource instance.

Parameters:

defaultRequestProperties: The default RequestProperties to be used by the HttpDataSource instance.

Returns:

A HttpDataSource instance.