Interface PropagatedHeaders
-
- All Known Implementing Classes:
PropagatedHeaders.NoopPropagatedHeaders,PropagatedHeaders.PrefixedPropagatedHeaders
public interface PropagatedHeadersHeaders propagated between Participant and Coordinator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPropagatedHeaders.NoopPropagatedHeadersNoop headers, always returns same instance of empty map.static classPropagatedHeaders.PrefixedPropagatedHeadersPropagated 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 voidclear()Clear all headers.static PropagatedHeaderscreate(Set<String> prefixes)Create new instance, with prefixes for allowed headers.static PropagatedHeadersnoop()Create new noop instance, always returns same instance of empty map.voidscan(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
-
-