Interface TextMapPropagator.Getter<C>
-
- Type Parameters:
C
- carrier of propagation fields, such as an http request.
- Enclosing interface:
- TextMapPropagator
public static interface TextMapPropagator.Getter<C>
Interface that allows aTextMapPropagator
to read propagated fields from a carrier.Getter
is stateless and allows to be saved as a constant to avoid runtime allocations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
get(C carrier, String key)
Returns the first value of the given propagationkey
or returnsnull
.Iterable<String>
keys(C carrier)
Returns all the keys in the given carrier.
-
-
-
Method Detail
-
keys
Iterable<String> keys(C carrier)
Returns all the keys in the given carrier.- Parameters:
carrier
- carrier of propagation fields, such as an http request.- Since:
- 0.10.0
-
get
@Nullable String get(@Nullable C carrier, String key)
Returns the first value of the given propagationkey
or returnsnull
.- Parameters:
carrier
- carrier of propagation fields, such as an http request.key
- the key of the field.- Returns:
- the first value of the given propagation
key
or returnsnull
.
-
-