Class AppConfigurationRefreshEventListener

java.lang.Object
com.azure.spring.cloud.config.web.pushrefresh.AppConfigurationRefreshEventListener
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<AppConfigurationRefreshEvent>

@Component public final class AppConfigurationRefreshEventListener extends Object implements org.springframework.context.ApplicationListener<AppConfigurationRefreshEvent>
Listens for AppConfigurationRefreshEvents and sets the App Configuration watch interval to zero.
  • Constructor Details

    • AppConfigurationRefreshEventListener

      public AppConfigurationRefreshEventListener(AppConfigurationRefresh appConfigurationRefresh)
      Listener for AppConfigurationRefreshEvents, used to trigger an early cache expiration of a given config store.
      Parameters:
      appConfigurationRefresh - refresher for App Config stores.
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(AppConfigurationRefreshEvent event)
      Handles an appConfigurationRefreshEvent. Expires refresh interval for a single config store.
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<AppConfigurationRefreshEvent>
      Parameters:
      event - Event Triggering refresh, contains valid config store endpoint.