
Class BaseSubscriptionSettings
- Direct Known Subclasses:
SubscriptionSettings
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSupportedSubscriptionType(org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType theSubscriptionChannelType) This setting indicates which subscription channel types are supported by the server.voidIf e-mail subscriptions are supported, the From address used when sending e-mailsProvides the regex expression to perform endpoint URL validation If rest-hook subscriptions are supported.longThe interval in which the Resource Changes will be polled from DB.Set<org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType> This setting indicates which subscription channel types are supported by the server.If websocket subscriptions are enabled, this specifies the context path that listens to them.booleanWhether an endpoint validation Regex was set for URL validation.booleanIndicate whether a subscription channel type is supported by this server.booleanIf enabled, the server will support cross-partition subscription.booleanIf set tofalse(default is true) the server will not use in-memory subscription searching and instead use the database matcher for all subscription criteria matching.booleanIf set to true, the server will prevent the creation of Subscriptions which cannot be evaluated IN-MEMORY.booleanThis setting returns whether the channel name should be qualified or not.booleanIf this is enabled (default is false), changes to Subscription resource would be put on queue immediately.booleanIf set to true (default is false) then subscriptions will be triggered for resource updates even if they do not trigger a new version (e.g.voidsetCrossPartitionSubscriptionEnabled(boolean theAllowCrossPartitionSubscription) If enabled, the server will support cross-partition subscription.voidsetEmailFromAddress(String theEmailFromAddress) Set the from address used for sending emails when using email subscriptionsvoidsetEnableInMemorySubscriptionMatching(boolean theEnableInMemorySubscriptionMatching) If set tofalse(default is true) the server will not use in-memory subscription searching and instead use the database matcher for all subscription criteria matching.voidsetOnlyAllowInMemorySubscriptions(boolean theAllowOnlyInMemorySearchParams) If set to true, the server will prevent the creation of Subscriptions which cannot be evaluated IN-MEMORY.voidsetQualifySubscriptionMatchingChannelName(boolean theQualifySubscriptionMatchingChannelName) This setting controls whether the channel name should be qualified or not.voidsetRestHookEndpointUrlValidationRegex(String theRestHookEndpointUrlValidationgRegex) Configure the regex expression that will be used to validate the endpoint URL.voidsetSubscriptionChangeQueuedImmediately(boolean theSubscriptionChangeQueuedImmediately) If this is enabled (default is false), changes to Subscription resource would be put on queue immediately.voidsetSubscriptionIntervalInMs(long theSubscriptionIntervalInMs) The interval in which the Resource Changes will be polled from DB.voidsetTriggerSubscriptionsForNonVersioningChanges(boolean theTriggerSubscriptionsForNonVersioningChanges) If set to true (default is false) then subscriptions will be triggered for resource updates even if they do not trigger a new version (e.g.voidsetWebsocketContextPath(String theWebsocketContextPath) Set the websocket endpoint context path to use when websocket subscriptions are enabled.
-
Field Details
-
DEFAULT_EMAIL_FROM_ADDRESS
- See Also:
-
DEFAULT_WEBSOCKET_CONTEXT_PATH
- See Also:
-
DEFAULT_RESTHOOK_ENDPOINTURL_VALIDATION_REGEX
- See Also:
-
DEFAULT_SUBMISSION_INTERVAL_IN_MS
- See Also:
-
-
Constructor Details
-
BaseSubscriptionSettings
public BaseSubscriptionSettings()
-
-
Method Details
-
addSupportedSubscriptionType
public void addSupportedSubscriptionType(org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType theSubscriptionChannelType) This setting indicates which subscription channel types are supported by the server. Any subscriptions submitted to the server matching these types will be activated. -
getSupportedSubscriptionTypes
public Set<org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType> getSupportedSubscriptionTypes()This setting indicates which subscription channel types are supported by the server. Any subscriptions submitted to the server matching these types will be activated. -
hasSupportedSubscriptionTypes
Indicate whether a subscription channel type is supported by this server.- Returns:
- true if at least one subscription channel type is supported by this server false otherwise.
-
clearSupportedSubscriptionTypesForUnitTest
-
getEmailFromAddress
If e-mail subscriptions are supported, the From address used when sending e-mails -
setEmailFromAddress
Set the from address used for sending emails when using email subscriptions -
getWebsocketContextPath
If websocket subscriptions are enabled, this specifies the context path that listens to them. Default value "/websocket". -
setWebsocketContextPath
Set the websocket endpoint context path to use when websocket subscriptions are enabled. Default value "/websocket". -
isQualifySubscriptionMatchingChannelName
This setting returns whether the channel name should be qualified or not.- Returns:
- whether the channel name is qualified or not
- Since:
- 6.4.0
-
setQualifySubscriptionMatchingChannelName
public void setQualifySubscriptionMatchingChannelName(boolean theQualifySubscriptionMatchingChannelName) This setting controls whether the channel name should be qualified or not. Default is true, ie, the channel name will be qualified.- Since:
- 6.4.0
-
isCrossPartitionSubscriptionEnabled
If enabled, the server will support cross-partition subscription. This subscription will be the responsible for all the requests from all the partitions on this server. For example, if the server has 3 partitions, P1, P2, P3 The subscription will live in the DEFAULT partition. Resource posted to DEFAULT, P1, P2, and P3 will trigger this subscription.Default is
false- Since:
- 5.7.0
-
setCrossPartitionSubscriptionEnabled
If enabled, the server will support cross-partition subscription. This subscription will be the responsible for all the requests from all the partitions on this server. For example, if the server has 3 partitions, P1, P2, P3 The subscription will live in the DEFAULT partition. Resource posted to DEFAULT, P1, P2, and P3 will trigger this subscription.Default is
false- Since:
- 5.7.0
-
setOnlyAllowInMemorySubscriptions
If set to true, the server will prevent the creation of Subscriptions which cannot be evaluated IN-MEMORY. This can improve overall server performance.- Since:
- 6.8.0
-
isOnlyAllowInMemorySubscriptions
If set to true, the server will prevent the creation of Subscriptions which cannot be evaluated IN-MEMORY. This can improve overall server performance.- Returns:
- Returns the value of
setOnlyAllowInMemorySubscriptions(boolean) - Since:
- 6.8.0
-
isEnableInMemorySubscriptionMatching
If set tofalse(default is true) the server will not use in-memory subscription searching and instead use the database matcher for all subscription criteria matching.When there are subscriptions registered on the server, the default behaviour is to compare the changed resource to the subscription criteria directly in-memory without going out to the database. Certain types of subscription criteria, e.g. chained references of queries with qualifiers or prefixes, are not supported by the in-memory matcher and will fall back to a database matcher.
The database matcher performs a query against the database by prepending ?id=XYZ to the subscription criteria where XYZ is the id of the changed entity
- Since:
- 3.6.1
-
setEnableInMemorySubscriptionMatching
If set tofalse(default is true) the server will not use in-memory subscription searching and instead use the database matcher for all subscription criteria matching.When there are subscriptions registered on the server, the default behaviour is to compare the changed resource to the subscription criteria directly in-memory without going out to the database. Certain types of subscription criteria, e.g. chained references of queries with qualifiers or prefixes, are not supported by the in-memory matcher and will fall back to a database matcher.
The database matcher performs a query against the database by prepending ?id=XYZ to the subscription criteria where XYZ is the id of the changed entity
- Since:
- 3.6.1
-
isTriggerSubscriptionsForNonVersioningChanges
If set to true (default is false) then subscriptions will be triggered for resource updates even if they do not trigger a new version (e.g. $meta-add and $meta-delete).- Since:
- 5.5.0
-
setTriggerSubscriptionsForNonVersioningChanges
public void setTriggerSubscriptionsForNonVersioningChanges(boolean theTriggerSubscriptionsForNonVersioningChanges) If set to true (default is false) then subscriptions will be triggered for resource updates even if they do not trigger a new version (e.g. $meta-add and $meta-delete).- Since:
- 5.5.0
-
getRestHookEndpointUrlValidationRegex
Provides the regex expression to perform endpoint URL validation If rest-hook subscriptions are supported. Default value isDEFAULT_RESTHOOK_ENDPOINTURL_VALIDATION_REGEX.- Since:
- 7.6.0
-
setRestHookEndpointUrlValidationRegex
Configure the regex expression that will be used to validate the endpoint URL. Set to NULL or EMPTY for no endpoint URL validation.- Since:
- 7.6.0
-
hasRestHookEndpointUrlValidationRegex
Whether an endpoint validation Regex was set for URL validation.- Since:
- 7.6.0
-
isSubscriptionChangeQueuedImmediately
If this is enabled (default is false), changes to Subscription resource would be put on queue immediately. Reducing delay between creation of the Subscription and Activation.- Since:
- 8.0.0
-
setSubscriptionChangeQueuedImmediately
If this is enabled (default is false), changes to Subscription resource would be put on queue immediately. Reducing delay between creation of the Subscription and Activation.- Since:
- 8.0.0
-
getSubscriptionIntervalInMs
The interval in which the Resource Changes will be polled from DB. Defaults to 5000.- Since:
- 7.7.0
-
setSubscriptionIntervalInMs
The interval in which the Resource Changes will be polled from DB. Defaults to 5000.- Since:
- 7.7.0
-