From 3e324355f26f6c11d4ab96fa575f590dfee289f8 Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 14 Sep 2020 13:28:36 -0400 Subject: [PATCH] Add javadocs --- .../server/messaging/json/HapiMessageHeaders.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/messaging/json/HapiMessageHeaders.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/messaging/json/HapiMessageHeaders.java index 17bf3488270..e4e6d847621 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/messaging/json/HapiMessageHeaders.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/messaging/json/HapiMessageHeaders.java @@ -8,6 +8,12 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; +/** + * This class is for holding headers for BaseJsonMessages. Any serializable data can be thrown into + * the header map. There are also three special headers, defined by the constants in this class, which are for use + * in message handling retrying. There are also matching helper functions for fetching those special variables; however + * they can also be accessed in standard map fashion with a `get` on the map. + */ public class HapiMessageHeaders implements Map, IModelJson { public static String RETRY_COUNT_HEADER = "retryCount"; public static String FIRST_FAILURE_HEADER = "firstFailure"; @@ -100,7 +106,11 @@ public class HapiMessageHeaders implements Map, IModelJson { public Map getHeaders() { return this.headers; } - public void initializeDefaultRetryValues() { + + /** + * Sets deffault values for the special headers that HAPI cares about during retry. + */ + public void initializeDefaultRetryValues() { headers.put(RETRY_COUNT_HEADER, 0); headers.put(FIRST_FAILURE_HEADER, null); headers.put(LAST_FAILURE_HEADER, null);