/** * Add to headers any information that will be missing from topic path. * * @param filteredHeaders headers read from external headers. * @param topicPath topic path of an adaptable. * @return filteredHeaders with extra information from topicPath. */ private static DittoHeaders addTopicPathInfo(final DittoHeaders filteredHeaders, final TopicPath topicPath) { final DittoHeaders extraInfo = mapTopicPathToHeaders(topicPath); return extraInfo.isEmpty() ? filteredHeaders : filteredHeaders.toBuilder().putHeaders(extraInfo).build(); }
/** * Add to headers any information that will be missing from topic path. * * @param filteredHeaders headers read from external headers. * @param topicPath topic path of an adaptable. * @return filteredHeaders with extra information from topicPath. */ private static DittoHeaders addTopicPathInfo(final DittoHeaders filteredHeaders, final TopicPath topicPath) { final DittoHeaders extraInfo = mapTopicPathToHeaders(topicPath); return extraInfo.isEmpty() ? filteredHeaders : filteredHeaders.toBuilder().putHeaders(extraInfo).build(); }