Class NacosGracefulShutdownDelegate

java.lang.Object
com.alibaba.cloud.nacos.registry.NacosGracefulShutdownDelegate
All Implemented Interfaces:
EventListener, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>

public class NacosGracefulShutdownDelegate extends Object implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>, org.springframework.context.ApplicationContextAware
Author:
uuuyuqi
  • Constructor Details

  • Method Details

    • setApplicationContext

      public void setApplicationContext(@NonNull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • onApplicationEvent

      public void onApplicationEvent(@NonNull org.springframework.context.event.ContextClosedEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>
    • doGracefulShutdown

      protected void doGracefulShutdown()
    • supportsAsyncExecution

      public boolean supportsAsyncExecution()
      Specified by:
      supportsAsyncExecution in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>