Class BaseIDAWebSubInitializer

  • All Implemented Interfaces:
    EventListener, org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
    Direct Known Subclasses:
    CacheUpdatingWebsubInitializer

    @Component
    public abstract class BaseIDAWebSubInitializer
    extends Object
    implements org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
    Subscribes to the topics on the application startup. (some configured delay is applied for the application to be ready for the intent verification by the websub hub to work) Also if configured, this listener schedules re-subscription of topics which is done as a work-around for the bug: MOSIP-9496. By default the ida-websub-resubscription-delay-secs value is set to 0 that disables this workaround. To enable this, that property should be assigned with a positive number like 1 * 60 * 60 = 3600 for one hour.
    Author:
    Loganathan Sekar, Manoj SP
    • Field Detail

      • webSubHelper

        @Autowired
        protected WebSubHelper webSubHelper
        The web sub helper.
    • Constructor Detail

      • BaseIDAWebSubInitializer

        public BaseIDAWebSubInitializer()
    • Method Detail

      • onApplicationEvent

        public void onApplicationEvent​(org.springframework.boot.context.event.ApplicationReadyEvent event)
        On application event.
        Specified by:
        onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
        Parameters:
        event - the event
      • doInitSubscriptions

        protected abstract int doInitSubscriptions()
        Do init subscriptions.
      • doRegisterTopics

        protected abstract int doRegisterTopics()
        Do register topics.