public abstract class HealthDto extends Object
This can be used to construct health responses for the Basic Availability Check, Primary Health Check, and Diagnostic Health Check.
Modifier and Type | Class and Description |
---|---|
static class |
HealthDto.Builder |
Constructor and Description |
---|
HealthDto() |
Modifier and Type | Method and Description |
---|---|
static HealthDto.Builder |
builder()
Creates a new builder for
HealthDto . |
static HealthDto.Builder |
builder(HealthDto healthDto)
Creates a new builder for
HealthDto with values copied from the existing
HealthDto . |
static HealthDto.Builder |
builder(ServiceMetadata serviceMetadata)
Creates a builder for
HealthDto initialized with the properties of the given metadata. |
abstract Optional<BuildDto> |
getBuild() |
abstract Optional<List<HealthDependencyDto>> |
getDependencies() |
abstract Optional<String> |
getMessage()
Returns a description of the status of the service (e.g.
|
abstract Optional<ServerDto> |
getServer() |
abstract Integer |
getStatus()
Returns the status code representing the health of the service.
|
abstract HealthDto.Builder |
toBuilder()
Returns a builder with same property values as this; allowing modification of some values.
|
public static HealthDto.Builder builder()
HealthDto
.public static HealthDto.Builder builder(HealthDto healthDto)
HealthDto
with values copied from the existing
HealthDto
.public static HealthDto.Builder builder(ServiceMetadata serviceMetadata)
HealthDto
initialized with the properties of the given metadata.public abstract Optional<String> getMessage()
This field may also include further potentially useful details, such as debugging information.
@Nullable public abstract Integer getStatus()
This is not included in the json model since it is used as the HTTP response code.
public abstract Optional<List<HealthDependencyDto>> getDependencies()
public abstract HealthDto.Builder toBuilder()
Copyright © 2020 Cerner Innovation, Inc.. All rights reserved.