Class SubscriptionActivatingSubscriber

java.lang.Object
ca.uhn.fhir.jpa.subscription.match.matcher.subscriber.SubscriptionActivatingSubscriber
All Implemented Interfaces:
org.springframework.messaging.MessageHandler

public class SubscriptionActivatingSubscriber extends Object implements org.springframework.messaging.MessageHandler
Responsible for transitioning subscription resources from REQUESTED to ACTIVE Once activated, the subscription is added to the SubscriptionRegistry.

Also validates criteria. If invalid, rejects the subscription without persisting the subscription.

  • Constructor Details

  • Method Details

    • handleMessage

      public void handleMessage(@Nonnull org.springframework.messaging.Message<?> theMessage) throws org.springframework.messaging.MessagingException
      Specified by:
      handleMessage in interface org.springframework.messaging.MessageHandler
      Throws:
      org.springframework.messaging.MessagingException
    • activateSubscriptionIfRequired

      public boolean activateSubscriptionIfRequired(org.hl7.fhir.instance.model.api.IBaseResource theSubscription)
      Note: This is synchronized because this is called both by matching channel messages as well as from Subscription Loader (which periodically refreshes from the DB to make sure nothing got missed). If these two mechanisms try to activate the same subscription at the same time they can get a constraint error.
    • isChannelTypeSupported

      public boolean isChannelTypeSupported(org.hl7.fhir.instance.model.api.IBaseResource theSubscription)