Class ServerListService
- java.lang.Object
-
- com.alibaba.nacos.config.server.service.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServerListService.ServerListChangeEventserverList has changed
-
Field Summary
Fields Modifier and Type Field Description StringaddressPortStringaddressServerUrlStringaddressUrlStringdomainNameStringenvIdUrl
-
Constructor Summary
Constructors Constructor Description ServerListService(javax.servlet.ServletContext servletContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getServerList()static List<String>getServerListUnhealth()voidinit()static booleanisAddressServerHealth()static BooleanisFirstIp()booleanisHealthCheck()static booleanisInIpList()voidonApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event)static voidsetServerList(List<String> serverList)
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
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:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>
-
-