File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/messaging Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2222import ca .uhn .fhir .rest .server .messaging .json .BaseJsonMessage ;
2323import jakarta .annotation .Nonnull ;
2424
25+ import java .util .HashMap ;
2526import java .util .Map ;
2627import java .util .Optional ;
2728import java .util .UUID ;
29+ import java .util .stream .Collectors ;
2830
2931/**
3032 * This interface is implemented by serializable "wrapper" message classes that are exchanged with Massage Brokers. HAPI-FHIR
@@ -65,4 +67,9 @@ default <H> Optional<H> getHeader(String theHeaderName) {
6567 * @return the de-serialized value of the message
6668 */
6769 T getPayload ();
70+
71+ default Map <String , String > getHeadersAsStrings () {
72+ return getHeaders ().entrySet ().stream ()
73+ .collect (Collectors .toMap (Map .Entry ::getKey , e -> e .getValue ().toString ()));
74+ }
6875}
You can’t perform that action at this time.
0 commit comments