Class HeaderUtils
java.lang.Object
org.openehealth.ipf.platform.camel.ihe.ws.HeaderUtils
Utilities for handling HTTP and SOAP headers in Web Service interactions.
- Author:
- Dmytro Rud
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
getHeaders
(Map<String, Object> messageContext, String key, boolean useInputMessage, boolean needCreateWhenNotExist, Supplier<T> defaultValueFactory) Returns headers of the message represented by the given context.static void
processIncomingHeaders
(Map<String, Object> messageContext, Message message) static void
processUserDefinedOutgoingHeaders
(Map<String, Object> messageContext, Message message, boolean isRequest)
-
Method Details
-
processIncomingHeaders
-
processUserDefinedOutgoingHeaders
-
getHeaders
public static <T> T getHeaders(Map<String, Object> messageContext, String key, boolean useInputMessage, boolean needCreateWhenNotExist, Supplier<T> defaultValueFactory) Returns headers of the message represented by the given context.- Type Parameters:
T
- type of headers' container.- Parameters:
messageContext
- Web Service message context.key
- key under which the headers reside in the message context.useInputMessage
- whether input message should the used.needCreateWhenNotExist
- whether the headers' map should be created when it does not exist.defaultValueFactory
- factory for producing default values.- Returns:
- either the map of HTTP headers as found in the message context,
or a newly created map when none found, or
null
when creation of a new map is not allowed.
-