HttpDataSource.RequestProperties
@UnstableApi
public final class HttpDataSource.RequestProperties
Stores HTTP request properties (aka HTTP headers) and provides methods to modify the headers in a thread safe way to avoid the potential of creating snapshots of an inconsistent or unintended state.
Summary
Public constructors |
|---|
Public methods |
|
|---|---|
synchronized void |
clear()Clears all request properties. |
synchronized void |
clearAndSet(Map<String, String> properties)Removes all properties previously existing and sets the keys and values of the map. |
synchronized Map<String, String> |
Gets a snapshot of the request properties. |
synchronized void |
Removes a request property by name. |
synchronized void |
Sets the keys and values contained in the map. |
synchronized void |
Sets the specified property |
Public constructors
Public methods
clearAndSet
synchronized public void clearAndSet(Map<String, String> properties)
Removes all properties previously existing and sets the keys and values of the map.
getSnapshot
synchronized public Map<String, String> getSnapshot()
Gets a snapshot of the request properties.
remove
synchronized public void remove(String name)
Removes a request property by name.
| Parameters | |
|---|---|
String name |
The name of the request property to remove. |
set
synchronized public void set(Map<String, String> properties)
Sets the keys and values contained in the map. If a property previously existed, the old value is replaced by the specified value. If a property previously existed and is not in the map, the property is left unchanged.