Uses of Interface
com.sap.cloud.sdk.cloudplatform.requestheader.RequestHeaderContainer
-
Uses of RequestHeaderContainer in com.sap.cloud.sdk.cloudplatform.requestheader
Modifier and TypeClassDescriptionfinal class
Default implementation of theRequestHeaderContainer
interface.Modifier and TypeFieldDescriptionstatic final RequestHeaderContainer
RequestHeaderContainer.EMPTY
An emptyRequestHeaderContainer
.Modifier and TypeMethodDescriptionDefaultRequestHeaderContainer.Builder.build()
RequestHeaderContainer.Builder.build()
Initializes a new instance ofRequestHeaderContainer
from the HTTP headers and cookies contained in thisRequestHeaderContainer.Builder
.static RequestHeaderContainer
DefaultRequestHeaderContainer.fromMultiValueMap
(Map<String, ? extends Iterable<String>> headers) Initializes a new instance of theDefaultRequestHeaderContainer
class from the givenheaders
.static RequestHeaderContainer
DefaultRequestHeaderContainer.fromSingleValueMap
(Map<String, String> headers) Initializes a new instance of theDefaultRequestHeaderContainer
class from the givenheaders
.static RequestHeaderContainer
RequestHeaderAccessor.getHeaderContainer()
Returns the currentRequestHeaderContainer
.Modifier and TypeMethodDescriptionstatic Supplier<RequestHeaderContainer>
RequestHeaderAccessor.getFallbackHeaderContainer()
static io.vavr.control.Try<RequestHeaderContainer>
RequestHeaderAccessor.tryGetHeaderContainer()
Tries to get the currentRequestHeaderContainer
.io.vavr.control.Try<RequestHeaderContainer>
DefaultRequestHeaderFacade.tryGetRequestHeaders()
io.vavr.control.Try<RequestHeaderContainer>
RequestHeaderFacade.tryGetRequestHeaders()
Returns aTry
that might contain theRequestHeaderContainer
of the current context.Modifier and TypeMethodDescriptionstatic void
RequestHeaderAccessor.executeWithHeaderContainer
(RequestHeaderContainer headers, Executable executable) Runs the givenexecutable
with the givenheaders
available.static <T> T
RequestHeaderAccessor.executeWithHeaderContainer
(RequestHeaderContainer headers, Callable<T> callable) Runs the givencallable
with the givenheaders
available and returns the result.DefaultRequestHeaderContainer.Builder.replaceHeader
(String name, RequestHeaderContainer headerContainer) RequestHeaderContainer.Builder.replaceHeader
(String name, RequestHeaderContainer headerContainer) Replaces an HTTP header in thisRequestHeaderContainer.Builder
by copying the HTTP header of the givenheaderContainer
.DefaultRequestHeaderContainer.Builder.withHeader
(String name, RequestHeaderContainer headerContainer) RequestHeaderContainer.Builder.withHeader
(String name, RequestHeaderContainer headerContainer) Copies the HTTP header with the givenname
- including all it's values - from theheaderContainer
.DefaultRequestHeaderContainer.Builder.withHeaders
(RequestHeaderContainer headerContainer) RequestHeaderContainer.Builder.withHeaders
(RequestHeaderContainer headerContainer) Copies all existing headers from the givenRequestHeaderContainer
.Modifier and TypeMethodDescriptionstatic void
RequestHeaderAccessor.executeWithFallbackHeaderContainer
(Supplier<RequestHeaderContainer> headers, Executable executable) Runs the givenexecutable
with the givenheaders
as a fallback option that should be used in case there is no currentRequestHeaderContainer
.static <T> T
RequestHeaderAccessor.executeWithFallbackHeaderContainer
(Supplier<RequestHeaderContainer> headers, Callable<T> callable) Runs the givencallable
with the givenheaders
as a fallback option that should be used in case there is no currentRequestHeaderContainer
.static void
RequestHeaderAccessor.setFallbackHeaderContainer
(Supplier<RequestHeaderContainer> fallbackHeaderContainer) ModifierConstructorDescriptionRequestHeaderThreadContextListener
(RequestHeaderContainer requestHeaders) Initializes a new instance of theRequestHeaderThreadContextListener
class with the givenrequestHeaders
.