Interface PropagatedHeaders
- All Known Implementing Classes:
PropagatedHeaders.NoopPropagatedHeaders
,PropagatedHeaders.PrefixedPropagatedHeaders
public interface PropagatedHeaders
Headers propagated between Participant and Coordinator.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
Noop headers, always returns same instance of empty map.static final class
Propagated headers which can scan for allowed headers with any of the preconfigured prefixes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear all headers.static PropagatedHeaders
Create new instance, with prefixes for allowed headers.static PropagatedHeaders
noop()
Create new noop instance, always returns same instance of empty map.void
Scan map of headers for any headers with allowed prefix.toMap()
Get all headers as a map.
-
Method Details
-
toMap
Get all headers as a map.- Returns:
- map of headers
-
scan
Scan map of headers for any headers with allowed prefix. Any existing headers with same key is replaced.- Parameters:
headers
- map to be scanned
-
clear
void clear()Clear all headers. -
create
Create new instance, with prefixes for allowed headers.- Parameters:
prefixes
- list of the allowed header prefixes- Returns:
- new instance, ready to scan for allowed headers
-
noop
Create new noop instance, always returns same instance of empty map.- Returns:
- noop instance
-