Class ServerListService

  • All Implemented Interfaces:
    EventListener, org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>

    @Service
    public class ServerListService
    extends Object
    implements org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>
    Serverlist service
    Author:
    Nacos
    • Field Detail

      • domainName

        public String domainName
      • addressPort

        public String addressPort
      • addressUrl

        public String addressUrl
      • envIdUrl

        public String envIdUrl
      • addressServerUrl

        public String addressServerUrl
    • Constructor Detail

      • ServerListService

        public ServerListService​(javax.servlet.ServletContext servletContext)
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • getServerList

        public List<String> getServerList()
      • setServerList

        public static void setServerList​(List<String> serverList)
      • getServerListUnhealth

        public static List<String> getServerListUnhealth()
      • isFirstIp

        public static Boolean isFirstIp()
      • isHealthCheck

        public boolean isHealthCheck()
      • isAddressServerHealth

        public static boolean isAddressServerHealth()
      • isInIpList

        public static boolean isInIpList()
      • onApplicationEvent

        public void onApplicationEvent​(org.springframework.boot.web.context.WebServerInitializedEvent event)
        Specified by:
        onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>