TextMapPropagator that implements the W3C specification for baggage header propagation.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final List | |
| private static final W3CBaggagePropagator | |
| private static final PercentEscaper |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | |
| private static String | |
| private static String | |
| public <C> Context | extract(Context
the context, C Context used to store the extracted value.holds propagation fields. For example, an outgoing message or http request. carrier, TextMapGetter<C> invoked for each propagation key to get data from the carrier. getter)Implements io. Extracts data from upstream. |
| private static void | |
| private static <C> Context | |
| private static <C> Context | |
| public Collection | fields()
Implements io. The propagation fields defined. |
| public static W3CBaggagePropagator | |
| public <C> void | inject(Context
the context, C Context containing the value to be injected.holds propagation fields. For example, an outgoing message or http request. carrier, TextMapSetter<C> invoked for each propagation key to add or remove. setter)Implements io. Injects data for downstream consumers, for example as HTTP headers. |
| private static boolean | Returns: whether the name is valid.the entry key name to be validated. name)Determines whether the given |
| private static boolean | Returns: whether the value is valid.the entry value to be validated. value)Determines whether the given |
| public String |
| FIELD | back to summary |
|---|---|
| private static final String FIELD | |
| FIELDS | back to summary |
|---|---|
| private static final List<String> FIELDS | |
| INSTANCE | back to summary |
|---|---|
| private static final W3CBaggagePropagator INSTANCE | |
| URL_ESCAPER | back to summary |
|---|---|
| private static final PercentEscaper URL_ESCAPER | |
| W3CBaggagePropagator | back to summary |
|---|---|
| private W3CBaggagePropagator() | |
| baggageIsInvalid | back to summary |
|---|---|
| private static boolean baggageIsInvalid(String key, BaggageEntry baggageEntry) | |
| baggageToString | back to summary |
|---|---|
| private static String baggageToString(Baggage baggage) | |
| encodeValue | back to summary |
|---|---|
| private static String encodeValue(String value) | |
| extract | back to summary |
|---|---|
| public <C> Context extract(Context context, C carrier, TextMapGetter<C> getter) Implements io. Doc from io. Extracts data from upstream. For example, from incoming http headers. The returned Context should contain the extracted data, if any, merged with the data from the passed-in Context. If the incoming information could not be parsed, implementations MUST return the original Context, unaltered.
| |
| extractEntries | back to summary |
|---|---|
| private static void extractEntries(String baggageHeader, BaggageBuilder baggageBuilder) | |
| extractMulti | back to summary |
|---|---|
| private static <C> Context extractMulti(Context context, C carrier, ExtendedTextMapGetter<C> getter) | |
| extractSingle | back to summary |
|---|---|
| private static <C> Context extractSingle(Context context, C carrier, TextMapGetter<C> getter) | |
| fields | back to summary |
|---|---|
| public Collection Implements io. Doc from io. The propagation fields defined. If your carrier is reused, you should delete the fields here
before calling For example, if the carrier is a single-use or immutable request object, you don't need to clear fields as they couldn't have been set before. If it is a mutable, retryable object, successive calls should clear these fields first. Some use cases for this are:
| |
| getInstance | back to summary |
|---|---|
| public static W3CBaggagePropagator getInstance() Singleton instance of the W3C Baggage Propagator. | |
| inject | back to summary |
|---|---|
| public <C> void inject(Context context, C carrier, TextMapSetter<C> setter) Implements io. Doc from io. Injects data for downstream consumers, for example as HTTP headers. The carrier may be null to
facilitate calling this method with a lambda for the
| |
| isValidBaggageKey | back to summary |
|---|---|
| private static boolean isValidBaggageKey(String name) Determines whether the given
| |
| isValidBaggageValue | back to summary |
|---|---|
| private static boolean isValidBaggageValue(String value) Determines whether the given
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |