aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/repository
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/repository
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/repository')
-rw-r--r--src/main/java/at/gv/egiz/moazs/repository/DeliveryRepository.java2
-rw-r--r--src/main/java/at/gv/egiz/moazs/repository/InMemoryDeliveryRepository.java5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/repository/DeliveryRepository.java b/src/main/java/at/gv/egiz/moazs/repository/DeliveryRepository.java
index d0a8148..57d2d07 100644
--- a/src/main/java/at/gv/egiz/moazs/repository/DeliveryRepository.java
+++ b/src/main/java/at/gv/egiz/moazs/repository/DeliveryRepository.java
@@ -17,7 +17,7 @@ public interface DeliveryRepository {
void add(MsgResponse response);
- Optional<MsgResponse> getResponse(String id);
+ Optional<MsgResponse> getResponse(String responseID);
}
diff --git a/src/main/java/at/gv/egiz/moazs/repository/InMemoryDeliveryRepository.java b/src/main/java/at/gv/egiz/moazs/repository/InMemoryDeliveryRepository.java
index d9abb7b..3b5a020 100644
--- a/src/main/java/at/gv/egiz/moazs/repository/InMemoryDeliveryRepository.java
+++ b/src/main/java/at/gv/egiz/moazs/repository/InMemoryDeliveryRepository.java
@@ -39,12 +39,11 @@ public class InMemoryDeliveryRepository implements DeliveryRepository {
@Override
public void add(MsgResponse response) {
String key = response.getResponseID();
- System.out.println("storing with response id " + key);
responseRepository.put(key, response);
}
@Override
- public Optional<MsgResponse> getResponse(String id) {
- return ofNullable(responseRepository.getIfPresent(id));
+ public Optional<MsgResponse> getResponse(String responseID) {
+ return ofNullable(responseRepository.getIfPresent(responseID));
}
}