public abstract static class HttpDataSource.BaseFactory extends Object implements HttpDataSource.Factory
HttpDataSource.Factory
that sets default request properties.Constructor and Description |
---|
BaseFactory() |
Modifier and Type | Method and Description |
---|---|
void |
clearAllDefaultRequestProperties()
Deprecated.
|
void |
clearDefaultRequestProperty(String name)
Deprecated.
|
HttpDataSource |
createDataSource()
Creates a
DataSource instance. |
protected abstract HttpDataSource |
createDataSourceInternal(HttpDataSource.RequestProperties defaultRequestProperties)
Called by
createDataSource() to create a HttpDataSource instance. |
HttpDataSource.RequestProperties |
getDefaultRequestProperties()
Gets the default request properties used by all
HttpDataSource s created by the
factory. |
void |
setDefaultRequestProperty(String name,
String value)
Deprecated.
|
public final HttpDataSource createDataSource()
DataSource.Factory
DataSource
instance.createDataSource
in interface DataSource.Factory
createDataSource
in interface HttpDataSource.Factory
public final HttpDataSource.RequestProperties getDefaultRequestProperties()
HttpDataSource.Factory
HttpDataSource
s created by the
factory. Changes to the properties will be reflected in any future requests made by
HttpDataSource
s created by the factory.getDefaultRequestProperties
in interface HttpDataSource.Factory
@Deprecated public final void setDefaultRequestProperty(String name, String value)
HttpDataSource.Factory
HttpDataSource
instances created by the factory.setDefaultRequestProperty
in interface HttpDataSource.Factory
name
- The name of the header field.value
- The value of the field.@Deprecated public final void clearDefaultRequestProperty(String name)
HttpDataSource.Factory
HttpDataSource
instances created by the factory.clearDefaultRequestProperty
in interface HttpDataSource.Factory
name
- The name of the header field.@Deprecated public final void clearAllDefaultRequestProperties()
HttpDataSource.Factory
HttpDataSource
instances created by the
factory.clearAllDefaultRequestProperties
in interface HttpDataSource.Factory
protected abstract HttpDataSource createDataSourceInternal(HttpDataSource.RequestProperties defaultRequestProperties)
createDataSource()
to create a HttpDataSource
instance.defaultRequestProperties
- The default RequestProperties
to be used by the
HttpDataSource
instance.HttpDataSource
instance.