Class AbstractEventListener<T extends AbstractEvent>

    • Constructor Detail

      • AbstractEventListener

        public AbstractEventListener()
    • Method Detail

      • onApplicationEvent

        public final void onApplicationEvent​(T event)
        The given ApplicationEvent has to be an instance of an AbstractEvent and must be addressed to the current cluster. If those conditions are true the onEvent(AbstractEvent) method is called.
        Specified by:
        onApplicationEvent in interface org.springframework.context.ApplicationListener<T extends AbstractEvent>
        Parameters:
        event - to be processed
      • onEvent

        protected abstract void onEvent​(T event)
        This method is called by ApplicationListener.onApplicationEvent(ApplicationEvent) and processes the given event.
        Parameters:
        event - the event to be processed
        See Also:
        ApplicationListener.onApplicationEvent(ApplicationEvent)
      • setTenantService

        public void setTenantService​(TenantService tenantService)
        Called either when registering with EventService.registerEventListener or when registering this bean in the spring context. If you forget to inject the TenantService it is set from within the afterPropertiesSet() method (see there). This is for your convenience.
      • setClusterService

        public void setClusterService​(ClusterService clusterService)
        Called either when registering with EventService.registerEventListener or when registering this bean in the spring context. If you forget to inject the ClusterService it is set from within the afterPropertiesSet() method (see there). This is for your convenience.
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
        Only called in case this bean is registered in ApplicationContext we need the applicationContext in afterPropertiesSet() to get the TenantService.
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware