public final class Status extends Object
Status provides convenient constants for commonly used states like UP
,
DOWN
or OUT_OF_SERVICE
.
Custom states can also be created and used throughout the Spring Boot Health subsystem.
Modifier and Type | Field and Description |
---|---|
static Status |
DOWN
Status indicating that the component or subsystem has suffered an
unexpected failure. |
static Status |
OUT_OF_SERVICE
Status indicating that the component or subsystem has been taken out of
service and should not be used. |
static Status |
UNKNOWN
Status indicating that the component or subsystem is in an unknown state. |
static Status |
UP
Status indicating that the component or subsystem is functioning as
expected. |
Constructor and Description |
---|
Status(String code)
Create a new
Status instance with the given code and an empty description. |
Status(String code,
String description)
Create a new
Status instance with the given code and description. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getCode()
Return the code for this status.
|
String |
getDescription()
Return the description of this status.
|
int |
hashCode() |
String |
toString() |
public static final Status UNKNOWN
Status
indicating that the component or subsystem is in an unknown state.public static final Status UP
Status
indicating that the component or subsystem is functioning as
expected.public static final Status DOWN
Status
indicating that the component or subsystem has suffered an
unexpected failure.public Status(String code)
Status
instance with the given code and an empty description.code
- the status codeCopyright © 2021 Pivotal Software, Inc.. All rights reserved.