@Internal
public class EC2ServiceInstance
extends java.lang.Object
implements io.micronaut.discovery.ServiceInstance, io.micronaut.discovery.ServiceInstance.Builder
Constructor and Description |
---|
EC2ServiceInstance(java.lang.String id,
java.net.URI uri)
Container to hold AWS EC2 Instance info.
|
Modifier and Type | Method and Description |
---|---|
io.micronaut.discovery.ServiceInstance |
build()
build for the builder.
|
java.util.Optional<java.lang.String> |
getGroup()
Gets group of instance.
|
io.micronaut.health.HealthStatus |
getHealthStatus()
Gets the current instance health status.
|
java.lang.String |
getId()
Same as instance id.
|
java.util.Optional<java.lang.String> |
getInstanceId()
Gets AWS ID for the instance.
|
io.micronaut.core.convert.value.ConvertibleValues<java.lang.String> |
getMetadata()
Gets the metadata information gathered from AWS for this instance.
|
java.util.Optional<java.lang.String> |
getRegion()
Gets the AWS Region of the instance.
|
java.net.URI |
getURI()
URI This instance can be access via (internal).
|
java.util.Optional<java.lang.String> |
getZone()
Gets the Zone/AZ for the AWS Instance.
|
io.micronaut.discovery.ServiceInstance.Builder |
group(java.lang.String group)
builder for group (not used).
|
io.micronaut.discovery.ServiceInstance.Builder |
instanceId(java.lang.String id)
instance id (same as id).
|
io.micronaut.discovery.ServiceInstance.Builder |
metadata(io.micronaut.core.convert.value.ConvertibleValues<java.lang.String> metadata)
Builder for metadata.
|
io.micronaut.discovery.ServiceInstance.Builder |
metadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Builder for metadata in map format.
|
io.micronaut.discovery.ServiceInstance.Builder |
region(java.lang.String region)
Builder for region.
|
io.micronaut.discovery.ServiceInstance.Builder |
status(io.micronaut.health.HealthStatus status)
Build for health status.
|
io.micronaut.discovery.ServiceInstance.Builder |
zone(java.lang.String zone)
The availablity zone of instance.
|
public EC2ServiceInstance(java.lang.String id, java.net.URI uri)
id
- if of the instanceuri
- uri to access this instancepublic io.micronaut.core.convert.value.ConvertibleValues<java.lang.String> getMetadata()
getMetadata
in interface io.micronaut.discovery.ServiceInstance
public io.micronaut.health.HealthStatus getHealthStatus()
getHealthStatus
in interface io.micronaut.discovery.ServiceInstance
public java.util.Optional<java.lang.String> getInstanceId()
getInstanceId
in interface io.micronaut.discovery.ServiceInstance
public java.util.Optional<java.lang.String> getZone()
getZone
in interface io.micronaut.discovery.ServiceInstance
public java.util.Optional<java.lang.String> getRegion()
getRegion
in interface io.micronaut.discovery.ServiceInstance
public java.util.Optional<java.lang.String> getGroup()
getGroup
in interface io.micronaut.discovery.ServiceInstance
public java.lang.String getId()
getId
in interface io.micronaut.discovery.ServiceInstance
public java.net.URI getURI()
getURI
in interface io.micronaut.discovery.ServiceInstance
public io.micronaut.discovery.ServiceInstance.Builder instanceId(java.lang.String id)
instanceId
in interface io.micronaut.discovery.ServiceInstance.Builder
id
- The instance idpublic io.micronaut.discovery.ServiceInstance.Builder zone(java.lang.String zone)
zone
in interface io.micronaut.discovery.ServiceInstance.Builder
zone
- The zonepublic io.micronaut.discovery.ServiceInstance.Builder region(java.lang.String region)
region
in interface io.micronaut.discovery.ServiceInstance.Builder
region
- The regionpublic io.micronaut.discovery.ServiceInstance.Builder group(java.lang.String group)
group
in interface io.micronaut.discovery.ServiceInstance.Builder
group
- The grouppublic io.micronaut.discovery.ServiceInstance.Builder status(io.micronaut.health.HealthStatus status)
status
in interface io.micronaut.discovery.ServiceInstance.Builder
status
- The statuspublic io.micronaut.discovery.ServiceInstance.Builder metadata(io.micronaut.core.convert.value.ConvertibleValues<java.lang.String> metadata)
metadata
- from awspublic io.micronaut.discovery.ServiceInstance.Builder metadata(java.util.Map<java.lang.String,java.lang.String> metadata)
metadata
in interface io.micronaut.discovery.ServiceInstance.Builder
metadata
- The metadata in map formatpublic io.micronaut.discovery.ServiceInstance build()
build
in interface io.micronaut.discovery.ServiceInstance.Builder