Interface PropagatedHeaders
-
- All Known Implementing Classes:
PropagatedHeaders.NoopPropagatedHeaders
,PropagatedHeaders.PrefixedPropagatedHeaders
public interface PropagatedHeaders
Headers propagated between Participant and Coordinator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PropagatedHeaders.NoopPropagatedHeaders
Noop headers, always returns same instance of empty map.static class
PropagatedHeaders.PrefixedPropagatedHeaders
Propagated headers which can scan for allowed headers with any of the preconfigured prefixes.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clear all headers.static PropagatedHeaders
create(Set<String> prefixes)
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<String,List<String>> headers)
Scan map of headers for any headers with allowed prefix.Map<String,List<String>>
toMap()
Get all headers as a map.
-
-
-
Method Detail
-
scan
void scan(Map<String,List<String>> headers)
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
static PropagatedHeaders create(Set<String> prefixes)
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
static PropagatedHeaders noop()
Create new noop instance, always returns same instance of empty map.- Returns:
- noop instance
-
-