Package io.opencensus.tags.propagation
Class TagContextTextFormat.Setter<C>
- java.lang.Object
-
- io.opencensus.tags.propagation.TagContextTextFormat.Setter<C>
-
- Type Parameters:
C
- carrier of propagation fields, such as an http request
- Enclosing class:
- TagContextTextFormat
public abstract static class TagContextTextFormat.Setter<C> extends java.lang.Object
Class that allows aTagContextTextFormat
to set propagated fields into a carrier.Setter
is stateless and allows to be saved as a constant to avoid runtime allocations.- Since:
- 0.21
-
-
Constructor Summary
Constructors Constructor Description Setter()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
put(C carrier, java.lang.String key, java.lang.String value)
Replaces a propagated field with the given value.
-
-
-
Method Detail
-
put
public abstract void put(C carrier, java.lang.String key, java.lang.String value)
Replaces a propagated field with the given value.For example, a setter for an
HttpURLConnection
would be the method referenceURLConnection.addRequestProperty(String, String)
- Parameters:
carrier
- holds propagation fields. For example, an outgoing message or http request.key
- the key of the field.value
- the value of the field.- Since:
- 0.21
-
-