@Introspected public class InstanceInfo extends java.lang.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(java.lang.String host,
int port,
@NotBlank java.lang.String appName,
@NotBlank java.lang.String instanceId)
Creates an
InstanceInfo. |
InstanceInfo(java.lang.String host,
int port,
java.lang.String ipAddress,
java.lang.String appName,
java.lang.String instanceId)
Creates an
InstanceInfo. |
InstanceInfo(java.lang.String host,
@NotBlank java.lang.String appName)
Creates an
InstanceInfo. |
InstanceInfo(java.lang.String host,
@NotBlank java.lang.String appName,
@NotBlank java.lang.String instanceId)
Creates an
InstanceInfo. |
| Modifier and Type | Method and Description |
|---|---|
@NotBlank java.lang.String |
getApp()
The application name.
|
java.lang.String |
getAppGroupName()
The application group name.
|
java.lang.String |
getAsgName() |
@Min(value=1L) int |
getCountryId()
The country id.
|
@NotNull DataCenterInfo |
getDataCenterInfo()
The
DataCenterInfo instance. |
java.lang.String |
getHealthCheckUrl() |
java.lang.String |
getHomePageUrl() |
@NotBlank java.lang.String |
getHostName()
The host name of the application instance.
|
java.lang.String |
getId()
Returns the unique id of the instance.
|
@NotBlank java.lang.String |
getInstanceId()
The instance id.
|
@NotBlank java.lang.String |
getIpAddr()
The IP address of the instance.
|
LeaseInfo |
getLeaseInfo()
The
LeaseInfo instance. |
java.util.Map<java.lang.String,java.lang.String> |
getMetadata() |
int |
getPort()
The port of the application instance.
|
io.micronaut.discovery.eureka.client.v2.InstanceInfo.PortWrapper |
getPortWrapper() |
java.lang.String |
getSecureHealthCheckUrl() |
int |
getSecurePort()
The secure port of the application instance.
|
io.micronaut.discovery.eureka.client.v2.InstanceInfo.PortWrapper |
getSecurePortWrapper() |
@NotBlank java.lang.String |
getSecureVipAddress() |
@NotNull InstanceInfo.Status |
getStatus() |
java.lang.String |
getStatusPageUrl() |
@NotBlank java.lang.String |
getVipAddress() |
void |
setAppGroupName(java.lang.String appGroupName)
Sets the application group name.
|
void |
setAsgName(java.lang.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(java.lang.String healthCheckUrl)
Sets the health check URL.
|
void |
setHomePageUrl(java.lang.String homePageUrl)
Sets the home page URL.
|
void |
setInstanceId(java.lang.String instanceId)
Sets the instance ID.
|
void |
setIpAddr(java.lang.String ipAddr)
Sets the IP address of the instance.
|
void |
setLeaseInfo(LeaseInfo leaseInfo)
Sets the
LeaseInfo. |
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata) |
void |
setPort(int port)
Sets the port of the application instance.
|
void |
setSecureHealthCheckUrl(java.lang.String secureHealthCheckUrl)
Sets the secure health check URL.
|
void |
setSecurePort(int securePort)
Sets the secure port of the application instance.
|
void |
setSecureVipAddress(java.lang.String secureVipAddress)
Sets the Secure Virtual Host Address.
|
void |
setStatus(InstanceInfo.Status status)
Sets the application status.
|
void |
setStatusPageUrl(java.lang.String statusPageUrl)
Sets the status page URL.
|
void |
setVipAddress(java.lang.String vipAddress)
Sets the Virtual Host Address.
|
java.lang.String |
toString() |
public static final int DEFAULT_PORT
public static final int DEFAULT_SECURE_PORT
public static final int DEFAULT_COUNTRY_ID
public InstanceInfo(java.lang.String host,
@NotBlank
@NotBlank java.lang.String appName,
@NotBlank
@NotBlank java.lang.String instanceId)
InstanceInfo.host - The host nameappName - The application nameinstanceId - The instance identifierpublic InstanceInfo(java.lang.String host,
@NotBlank
@NotBlank java.lang.String appName)
InstanceInfo. The getInstanceId() will default to the value of the hosthost - The host nameappName - The application namepublic InstanceInfo(java.lang.String host,
int port,
@NotBlank
@NotBlank java.lang.String appName,
@NotBlank
@NotBlank java.lang.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(java.lang.String host,
int port,
java.lang.String ipAddress,
java.lang.String appName,
java.lang.String instanceId)
InstanceInfo.host - The host nameport - The portipAddress - The IP addressappName - The application nameinstanceId - The instance identifierpublic java.lang.String toString()
toString in class java.lang.Object@NotBlank public @NotBlank java.lang.String getHostName()
getHostName in interface ConfigurableInstanceInfopublic java.lang.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 java.lang.String getApp()
getApp in interface ConfigurableInstanceInfopublic java.lang.String getAppGroupName()
getAppGroupName in interface ConfigurableInstanceInfo@NotBlank public @NotBlank java.lang.String getInstanceId()
getInstanceId in interface ConfigurableInstanceInfo@Min(value=1L) public @Min(value=1L) int getCountryId()
getCountryId in interface ConfigurableInstanceInfo@NotBlank public @NotBlank java.lang.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 java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata in interface ConfigurableInstanceInfopublic java.lang.String getStatusPageUrl()
getStatusPageUrl in interface ConfigurableInstanceInfopublic java.lang.String getHomePageUrl()
getHomePageUrl in interface ConfigurableInstanceInfopublic java.lang.String getHealthCheckUrl()
getHealthCheckUrl in interface ConfigurableInstanceInfo@NotBlank public @NotBlank java.lang.String getVipAddress()
getVipAddress in interface ConfigurableInstanceInfo@NotBlank public @NotBlank java.lang.String getSecureVipAddress()
getSecureVipAddress in interface ConfigurableInstanceInfopublic java.lang.String getSecureHealthCheckUrl()
getSecureHealthCheckUrl in interface ConfigurableInstanceInfopublic java.lang.String getAsgName()
getAsgName in interface ConfigurableInstanceInfopublic void setInstanceId(java.lang.String instanceId)
setInstanceId in interface ConfigurableInstanceInfoinstanceId - The instance IDpublic void setAsgName(java.lang.String asgName)
ConfigurableInstanceInfosetAsgName in interface ConfigurableInstanceInfoasgName - The Amazon auto scaling group name to usepublic void setHomePageUrl(java.lang.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(java.lang.String statusPageUrl)
ConfigurableInstanceInfosetStatusPageUrl in interface ConfigurableInstanceInfostatusPageUrl - The status page URLpublic void setHealthCheckUrl(java.lang.String healthCheckUrl)
ConfigurableInstanceInfosetHealthCheckUrl in interface ConfigurableInstanceInfohealthCheckUrl - The health check URLpublic void setSecureHealthCheckUrl(java.lang.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(java.lang.String appGroupName)
ConfigurableInstanceInfosetAppGroupName in interface ConfigurableInstanceInfoappGroupName - The application group namepublic void setIpAddr(java.lang.String ipAddr)
ConfigurableInstanceInfosetIpAddr in interface ConfigurableInstanceInfoipAddr - The IP address of the instancepublic void setVipAddress(java.lang.String vipAddress)
ConfigurableInstanceInfosetVipAddress in interface ConfigurableInstanceInfovipAddress - The Virtual Host Addresspublic void setSecureVipAddress(java.lang.String secureVipAddress)
ConfigurableInstanceInfosetSecureVipAddress in interface ConfigurableInstanceInfosecureVipAddress - The Secure Virtual Host Addresspublic void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
metadata - Sets the application metadata