![](/hapi-fhir/images/logos/raccoon-forwards.png)
Class BaseSubscriptionSettings
- Direct Known Subclasses:
SubscriptionSettings
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSupportedSubscriptionType
(org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelType theSubscriptionChannelType) This setting indicates which subscription channel types are supported by the server.void
If 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.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.boolean
Whether an endpoint validation Regex was set for URL validation.boolean
Indicate whether a subscription channel type is supported by this server.boolean
If enabled, the server will support cross-partition subscription.boolean
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.boolean
If set to true, the server will prevent the creation of Subscriptions which cannot be evaluated IN-MEMORY.boolean
This setting returns whether the channel name should be qualified or not.boolean
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.void
setCrossPartitionSubscriptionEnabled
(boolean theAllowCrossPartitionSubscription) If enabled, the server will support cross-partition subscription.void
setEmailFromAddress
(String theEmailFromAddress) Set the from address used for sending emails when using email subscriptionsvoid
setEnableInMemorySubscriptionMatching
(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.void
setOnlyAllowInMemorySubscriptions
(boolean theAllowOnlyInMemorySearchParams) If set to true, the server will prevent the creation of Subscriptions which cannot be evaluated IN-MEMORY.void
setQualifySubscriptionMatchingChannelName
(boolean theQualifySubscriptionMatchingChannelName) This setting controls whether the channel name should be qualified or not.void
setRestHookEndpointUrlValidationRegex
(String theRestHookEndpointUrlValidationgRegex) Configure the regex expression that will be used to validate the endpoint URL.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.void
setWebsocketContextPath
(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:
-
-
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
-