Package io.opencensus.tags.propagation
Class TagContextTextFormat.Getter<C>
- java.lang.Object
-
- io.opencensus.tags.propagation.TagContextTextFormat.Getter<C>
-
- Type Parameters:
C- carrier of propagation fields, such as an http request
- Enclosing class:
- TagContextTextFormat
public abstract static class TagContextTextFormat.Getter<C> extends java.lang.ObjectClass that allows aTagContextTextFormatto read propagated fields from a carrier.Getteris stateless and allows to be saved as a constant to avoid runtime allocations.- Since:
- 0.21
-
-
Constructor Summary
Constructors Constructor Description Getter()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.lang.Stringget(C carrier, java.lang.String key)Returns the first value of the given propagationkeyor returnsnull.
-
-
-
Method Detail
-
get
@Nullable public abstract java.lang.String get(C carrier, java.lang.String key)
Returns the first value of the given propagationkeyor returnsnull.- Parameters:
carrier- carrier of propagation fields, such as an http requestkey- the key of the field.- Returns:
- the first value of the given propagation
keyor returnsnull. - Since:
- 0.21
-
-