Add support for websocket subscriptions

This commit is contained in:
James Agnew
2019-03-14 17:34:15 -04:00
parent 4c419ec5d6
commit 18ead60ef0
11 changed files with 301 additions and 86 deletions

View File

@@ -53,18 +53,21 @@ public class FhirServerConfigCommon {
retVal.setFetchSizeDefaultMaximum(maxFetchSize);
ourLog.info("Server configured to have a maximum fetch size of " + (maxFetchSize == Integer.MAX_VALUE? "'unlimited'": maxFetchSize));
// You can enable these if you want to support Subscriptions from your server
// Subscriptions are enabled by channel type
if (HapiProperties.getSubscriptionRestHookEnabled()) {
ourLog.info("Enabling REST-hook subscriptions");
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
}
if (HapiProperties.getSubscriptionEmailEnabled()) {
ourLog.info("Enabling email subscriptions");
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL);
}
if (HapiProperties.getSubscriptionWebsocketEnabled()) {
ourLog.info("Enabling websocket subscriptions");
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.WEBSOCKET);
}
return retVal;
return retVal;
}
@Bean