C
- carrier of propagation fields, such as an http requestpublic abstract static class TextFormat.Setter<C> extends Object
TextFormat
to set propagated fields into a carrier.
Setter
is stateless and allows to be saved as a constant to avoid runtime
allocations.
Constructor and Description |
---|
Setter() |
Modifier and Type | Method and Description |
---|---|
abstract void |
put(C carrier,
String key,
String value)
Replaces a propagated field with the given value.
|
public abstract void put(C carrier, String key, String value)
For example, a setter for an HttpURLConnection
would be the method
reference URLConnection.addRequestProperty(String, String)
carrier
- holds propagation fields. For example, an outgoing message or http request.key
- the key of the field.value
- the value of the field.