Interface PropagatedHeaders

All Known Implementing Classes:
PropagatedHeaders.NoopPropagatedHeaders, PropagatedHeaders.PrefixedPropagatedHeaders

public interface PropagatedHeaders
Headers propagated between Participant and Coordinator.
  • Method Details

    • toMap

      Map<String,List<String>> toMap()
      Get all headers as a map.
      Returns:
      map of headers
    • 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