Class BaseIDAWebSubInitializer
- java.lang.Object
-
- io.mosip.authentication.common.service.websub.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 Summary
Fields Modifier and Type Field Description protected WebSubHelperwebSubHelperThe web sub helper.
-
Constructor Summary
Constructors Constructor Description BaseIDAWebSubInitializer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract intdoInitSubscriptions()Do init subscriptions.protected abstract intdoRegisterTopics()Do register topics.voidonApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event)On application event.
-
-
-
Field Detail
-
webSubHelper
@Autowired protected WebSubHelper webSubHelper
The web sub helper.
-
-
Method Detail
-
onApplicationEvent
public void onApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event)
On application event.- Specified by:
onApplicationEventin interfaceorg.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.
-
-