Class BaseSubscriptionSettings

java.lang.Object
ca.uhn.fhir.jpa.model.config.BaseSubscriptionSettings
Direct Known Subclasses:
SubscriptionSettings

public abstract class BaseSubscriptionSettings extends Object
  • Field Details

  • Constructor Details

  • 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

      public void setEmailFromAddress(String theEmailFromAddress)
      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

      public void setWebsocketContextPath(String theWebsocketContextPath)
      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

      public void setCrossPartitionSubscriptionEnabled(boolean theAllowCrossPartitionSubscription)
      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

      public void setOnlyAllowInMemorySubscriptions(boolean theAllowOnlyInMemorySearchParams)
      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 to false (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

      public void setEnableInMemorySubscriptionMatching(boolean theEnableInMemorySubscriptionMatching)
      If set to false (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 is DEFAULT_RESTHOOK_ENDPOINTURL_VALIDATION_REGEX.
      Since:
      7.6.0
    • setRestHookEndpointUrlValidationRegex

      public void setRestHookEndpointUrlValidationRegex(String theRestHookEndpointUrlValidationgRegex)
      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