@Introspected public class InstanceInfo extends Object implements ConfigurableInstanceInfo
Based on https://github.com/Netflix/eureka/blob/master/eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java
| Modifier and Type | Class and Description |
|---|---|
static class |
InstanceInfo.Status
The instance status according to Eureka.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_COUNTRY_ID
US by default.
|
static int |
DEFAULT_PORT
Eureka default port.
|
static int |
DEFAULT_SECURE_PORT
Secure port disabled by default.
|
| Constructor and Description |
|---|
InstanceInfo(String host,
int port,
@NotBlank String appName,
@NotBlank String instanceId)
Creates an
InstanceInfo. |
InstanceInfo(String host,
int port,
String ipAddress,
String appName,
String instanceId)
Creates an
InstanceInfo. |
InstanceInfo(String host,
@NotBlank String appName)
Creates an
InstanceInfo. |
InstanceInfo(String host,
@NotBlank String appName,
@NotBlank String instanceId)
Creates an
InstanceInfo. |
| Modifier and Type | Method and Description |
|---|---|
@NotBlank String |
getApp()
The application name.
|
String |
getAppGroupName()
The application group name.
|
String |
getAsgName() |
@Min(value=1L) int |
getCountryId()
The country id.
|
@NotNull DataCenterInfo |
getDataCenterInfo()
The
DataCenterInfo instance. |
String |
getHealthCheckUrl() |
String |
getHomePageUrl() |
@NotBlank String |
getHostName()
The host name of the application instance.
|
String |
getId()
Returns the unique id of the instance.
|
@NotBlank String |
getInstanceId()
The instance id.
|
@NotBlank String |
getIpAddr()
The IP address of the instance.
|
LeaseInfo |
getLeaseInfo()
The
LeaseInfo instance. |
Map<String,String> |
getMetadata() |
int |
getPort()
The port of the application instance.
|
io.micronaut.discovery.eureka.client.v2.InstanceInfo.PortWrapper |
getPortWrapper() |
String |
getSecureHealthCheckUrl() |
int |
getSecurePort()
The secure port of the application instance.
|
io.micronaut.discovery.eureka.client.v2.InstanceInfo.PortWrapper |
getSecurePortWrapper() |
@NotBlank String |
getSecureVipAddress() |
@NotNull InstanceInfo.Status |
getStatus() |
String |
getStatusPageUrl() |
@NotBlank String |
getVipAddress() |
void |
setAppGroupName(String appGroupName)
Sets the application group name.
|
void |
setAsgName(String asgName)
Sets the Amazon auto scaling group name to use.
|
void |
setCountryId(int countryId)
Sets the country id.
|
void |
setDataCenterInfo(DataCenterInfo dataCenterInfo)
Sets the
DataCenterInfo. |
void |
setHealthCheckUrl(String healthCheckUrl)
Sets the health check URL.
|
void |
setHomePageUrl(String homePageUrl)
Sets the home page URL.
|
void |
setInstanceId(String instanceId)
Sets the instance ID.
|
void |
setIpAddr(String ipAddr)
Sets the IP address of the instance.
|
void |
setLeaseInfo(LeaseInfo leaseInfo)
Sets the
LeaseInfo. |
void |
setMetadata(Map<String,String> metadata) |
void |
setPort(int port)
Sets the port of the application instance.
|
void |
setSecureHealthCheckUrl(String secureHealthCheckUrl)
Sets the secure health check URL.
|
void |
setSecurePort(int securePort)
Sets the secure port of the application instance.
|
void |
setSecureVipAddress(String secureVipAddress)
Sets the Secure Virtual Host Address.
|
void |
setStatus(InstanceInfo.Status status)
Sets the application status.
|
void |
setStatusPageUrl(String statusPageUrl)
Sets the status page URL.
|
void |
setVipAddress(String vipAddress)
Sets the Virtual Host Address.
|
String |
toString() |
public static final int DEFAULT_PORT
public static final int DEFAULT_SECURE_PORT
public static final int DEFAULT_COUNTRY_ID
public InstanceInfo(String host, @NotBlank @NotBlank String appName, @NotBlank @NotBlank String instanceId)
InstanceInfo.host - The host nameappName - The application nameinstanceId - The instance identifierpublic InstanceInfo(String host, @NotBlank @NotBlank String appName)
InstanceInfo. The getInstanceId() will default to the value of the hosthost - The host nameappName - The application namepublic InstanceInfo(String host, int port, @NotBlank @NotBlank String appName, @NotBlank @NotBlank String instanceId)
InstanceInfo. This constructor will perform an IP Address lookup based on the host namehost - The host nameport - The portappName - The application nameinstanceId - The instance identifierpublic InstanceInfo(String host, int port, String ipAddress, String appName, String instanceId)
InstanceInfo.host - The host nameport - The portipAddress - The IP addressappName - The application nameinstanceId - The instance identifier@NotBlank public @NotBlank String getHostName()
getHostName in interface ConfigurableInstanceInfopublic String getId()
getId in interface ConfigurableInstanceInfopublic int getPort()
getPort in interface ConfigurableInstanceInfopublic int getSecurePort()
getSecurePort in interface ConfigurableInstanceInfopublic io.micronaut.discovery.eureka.client.v2.InstanceInfo.PortWrapper getPortWrapper()
public io.micronaut.discovery.eureka.client.v2.InstanceInfo.PortWrapper getSecurePortWrapper()
public void setSecurePort(int securePort)
ConfigurableInstanceInfosetSecurePort in interface ConfigurableInstanceInfosecurePort - The secure port of the application instancepublic void setPort(int port)
ConfigurableInstanceInfosetPort in interface ConfigurableInstanceInfoport - The port of the application instance@NotBlank public @NotBlank String getApp()
getApp in interface ConfigurableInstanceInfopublic String getAppGroupName()
getAppGroupName in interface ConfigurableInstanceInfo@NotBlank public @NotBlank String getInstanceId()
getInstanceId in interface ConfigurableInstanceInfo@Min(value=1L) public @Min(value=1L) int getCountryId()
getCountryId in interface ConfigurableInstanceInfo@NotBlank public @NotBlank String getIpAddr()
getIpAddr in interface ConfigurableInstanceInfo@NotNull public @NotNull InstanceInfo.Status getStatus()
getStatus in interface ConfigurableInstanceInfo@NotNull public @NotNull DataCenterInfo getDataCenterInfo()
DataCenterInfo instance.getDataCenterInfo in interface ConfigurableInstanceInfopublic LeaseInfo getLeaseInfo()
LeaseInfo instance.getLeaseInfo in interface ConfigurableInstanceInfopublic Map<String,String> getMetadata()
getMetadata in interface ConfigurableInstanceInfopublic String getStatusPageUrl()
getStatusPageUrl in interface ConfigurableInstanceInfopublic String getHomePageUrl()
getHomePageUrl in interface ConfigurableInstanceInfopublic String getHealthCheckUrl()
getHealthCheckUrl in interface ConfigurableInstanceInfo@NotBlank public @NotBlank String getVipAddress()
getVipAddress in interface ConfigurableInstanceInfo@NotBlank public @NotBlank String getSecureVipAddress()
getSecureVipAddress in interface ConfigurableInstanceInfopublic String getSecureHealthCheckUrl()
getSecureHealthCheckUrl in interface ConfigurableInstanceInfopublic String getAsgName()
getAsgName in interface ConfigurableInstanceInfopublic void setInstanceId(String instanceId)
setInstanceId in interface ConfigurableInstanceInfoinstanceId - The instance IDpublic void setAsgName(String asgName)
ConfigurableInstanceInfosetAsgName in interface ConfigurableInstanceInfoasgName - The Amazon auto scaling group name to usepublic void setHomePageUrl(String homePageUrl)
ConfigurableInstanceInfosetHomePageUrl in interface ConfigurableInstanceInfohomePageUrl - The home page URLpublic void setLeaseInfo(LeaseInfo leaseInfo)
ConfigurableInstanceInfoLeaseInfo.setLeaseInfo in interface ConfigurableInstanceInfoleaseInfo - The LeaseInfopublic void setCountryId(int countryId)
ConfigurableInstanceInfosetCountryId in interface ConfigurableInstanceInfocountryId - The country idpublic void setStatusPageUrl(String statusPageUrl)
ConfigurableInstanceInfosetStatusPageUrl in interface ConfigurableInstanceInfostatusPageUrl - The status page URLpublic void setHealthCheckUrl(String healthCheckUrl)
ConfigurableInstanceInfosetHealthCheckUrl in interface ConfigurableInstanceInfohealthCheckUrl - The health check URLpublic void setSecureHealthCheckUrl(String secureHealthCheckUrl)
ConfigurableInstanceInfosetSecureHealthCheckUrl in interface ConfigurableInstanceInfosecureHealthCheckUrl - The secure health check URLpublic void setDataCenterInfo(DataCenterInfo dataCenterInfo)
ConfigurableInstanceInfoDataCenterInfo.setDataCenterInfo in interface ConfigurableInstanceInfodataCenterInfo - The DataCenterInfopublic void setStatus(InstanceInfo.Status status)
ConfigurableInstanceInfosetStatus in interface ConfigurableInstanceInfostatus - The application statuspublic void setAppGroupName(String appGroupName)
ConfigurableInstanceInfosetAppGroupName in interface ConfigurableInstanceInfoappGroupName - The application group namepublic void setIpAddr(String ipAddr)
ConfigurableInstanceInfosetIpAddr in interface ConfigurableInstanceInfoipAddr - The IP address of the instancepublic void setVipAddress(String vipAddress)
ConfigurableInstanceInfosetVipAddress in interface ConfigurableInstanceInfovipAddress - The Virtual Host Addresspublic void setSecureVipAddress(String secureVipAddress)
ConfigurableInstanceInfosetSecureVipAddress in interface ConfigurableInstanceInfosecureVipAddress - The Secure Virtual Host Address