fixed
This commit is contained in:
parent
37670ac039
commit
84db66d2e3
|
@ -62,25 +62,23 @@ public class StandaloneSubscriptionMessageHandler implements MessageHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateSubscriptionRegistryAndPerformMatching(ResourceModifiedMessage theResourceModifiedMessage) {
|
public void updateSubscriptionRegistryAndPerformMatching(ResourceModifiedMessage theResourceModifiedMessage) {
|
||||||
if (isSubscription(theResourceModifiedMessage)) {
|
|
||||||
handleSubscriptionActivation(theResourceModifiedMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
mySubscriptionMatchingSubscriber.matchActiveSubscriptionsAndDeliver(theResourceModifiedMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleSubscriptionActivation(ResourceModifiedMessage theResourceModifiedMessage) {
|
|
||||||
switch (theResourceModifiedMessage.getOperationType()) {
|
switch (theResourceModifiedMessage.getOperationType()) {
|
||||||
case DELETE:
|
case DELETE:
|
||||||
mySubscriptionRegistry.unregisterSubscription(theResourceModifiedMessage.getId(myFhirContext));
|
if (isSubscription(theResourceModifiedMessage)) {
|
||||||
break;
|
mySubscriptionRegistry.unregisterSubscription(theResourceModifiedMessage.getId(myFhirContext));
|
||||||
|
}
|
||||||
|
return;
|
||||||
case CREATE:
|
case CREATE:
|
||||||
case UPDATE:
|
case UPDATE:
|
||||||
registerActiveSubscription(theResourceModifiedMessage.getNewPayload(myFhirContext));
|
if (isSubscription(theResourceModifiedMessage)) {
|
||||||
|
registerActiveSubscription(theResourceModifiedMessage.getNewPayload(myFhirContext));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mySubscriptionMatchingSubscriber.matchActiveSubscriptionsAndDeliver(theResourceModifiedMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isSubscription(ResourceModifiedMessage theResourceModifiedMessage) {
|
private boolean isSubscription(ResourceModifiedMessage theResourceModifiedMessage) {
|
||||||
|
|
Loading…
Reference in New Issue