aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/config
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-07-09 10:32:54 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-07-09 10:32:54 +0200
commitd8c668bbca31a835c387a3d52293c9938c424f58 (patch)
tree819c44930a05071e8f8645a1427f9485a79da664 /src/main/java/at/gv/egiz/moazs/config
parentc1a1a5130a4ecf755da72941ad3525beb919447f (diff)
downloadmoa-zs-d8c668bbca31a835c387a3d52293c9938c424f58.tar.gz
moa-zs-d8c668bbca31a835c387a3d52293c9938c424f58.tar.bz2
moa-zs-d8c668bbca31a835c387a3d52293c9938c424f58.zip
Refactor MsgResponse and its IDs
StoreSOAPBodyBinaryInRepositoryInterceptor: - Replace "generate body's id via concatenation" with "give the right generator function the app delivery id and let the generator function do the work". Reason: Prevent the logistics of deriving IDs to spill into unrelated components. MsgResponse refactor: - Make MsgResponse an abstract class. - Derive ResponseID's ONLY in MsgResponse::createResponseID. Others: - Ensure that all invocations to DeliveryRepository.getResponse and BinaryRepository.get use "responseID" instead of ambiguous "id" or incorrect "appDeliveryID". - Move SingleThreadedDeliveryPipeline into process package.
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/config')
-rw-r--r--src/main/java/at/gv/egiz/moazs/config/RepositoryConfig.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/config/RepositoryConfig.java b/src/main/java/at/gv/egiz/moazs/config/RepositoryConfig.java
index ee73b9e..01a4cc3 100644
--- a/src/main/java/at/gv/egiz/moazs/config/RepositoryConfig.java
+++ b/src/main/java/at/gv/egiz/moazs/config/RepositoryConfig.java
@@ -11,6 +11,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import java.util.Map;
+import java.util.function.Function;
@Configuration
@Profile("!cluster")
@@ -25,8 +26,9 @@ public class RepositoryConfig {
}
@Bean
- public Map<String, String> idSuffixes() {
- return Map.of(NameSpace.MSG_DELIVERY_REQUEST_STATUS, RequestStatusResponse.getIdSuffix(),
- NameSpace.MSG_DELIVERY_NOTIFICATION, NotificationResponse.getIdSuffix());
+ public Map<String, Function<String, String>> idGenerators() {
+
+ return Map.of(NameSpace.MSG_DELIVERY_REQUEST_STATUS, RequestStatusResponse::getResponseID,
+ NameSpace.MSG_DELIVERY_NOTIFICATION, NotificationResponse::getResponseID);
}
}