@Service public class ServerListService extends Object implements org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>
| Modifier and Type | Class and Description |
|---|---|
static class |
ServerListService.ServerlistChangeEvent
serverList has changed
|
| Modifier and Type | Field and Description |
|---|---|
String |
addressPort |
String |
addressServerUrl |
String |
addressUrl |
String |
domainName |
String |
envIdUrl |
String |
serverPort
server之间通信的端口
|
| Constructor and Description |
|---|
ServerListService() |
| Modifier and Type | Method and Description |
|---|---|
String |
getEnvId() |
List<String> |
getServerList() |
static List<String> |
getServerListUnhealth() |
void |
init() |
static boolean |
isAddressServerHealth() |
static Boolean |
isFirstIp() |
boolean |
isHealthCheck() |
static boolean |
isInIpList() |
void |
onApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event) |
static void |
setServerList(List<String> serverList) |
public String serverPort
public String domainName
public String addressPort
public String addressUrl
public String envIdUrl
public String addressServerUrl
@PostConstruct public void init()
public String getEnvId()
public static Boolean isFirstIp()
public boolean isHealthCheck()
public static boolean isAddressServerHealth()
public static boolean isInIpList()
public void onApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>Copyright © 2018–2019 Alibaba Group. All rights reserved.