- All Known Subinterfaces:
HeaderConsumer
public interface HeaderProvider
API used to obtain headers when reading propagated tracing information incoming across service boundaries.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether a header is present.static HeaderProvider
Header provider from an existing map of headers (can be read only).static HeaderProvider
empty()
Empty headers.Get a header based on its name.Get a header based on its name, returning all values.keys()
All keys available in the headers (header names).
-
Method Details
-
empty
Empty headers.- Returns:
- empty headers provider
-
create
Header provider from an existing map of headers (can be read only).- Parameters:
inboundHeaders
- headers to use- Returns:
- a new header provider
-
keys
All keys available in the headers (header names).- Returns:
- iterable of keys
-
get
Get a header based on its name.- Parameters:
key
- name of the header- Returns:
- first header value if present in the headers
-
getAll
Get a header based on its name, returning all values.- Parameters:
key
- name of the header- Returns:
- all header values, or empty iterable if the header does not exist
-
contains
Whether a header is present.- Parameters:
key
- name of the header- Returns:
true
if the header exists
-