public final class Status
extends java.lang.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.
| 限定符和类型 | 字段和说明 |
|---|---|
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. |
| 构造器和说明 |
|---|
Status(java.lang.String code)
Create a new
Status instance with the given code and an empty description. |
Status(java.lang.String code,
java.lang.String description)
Create a new
Status instance with the given code and description. |
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(java.lang.String code)
Status instance with the given code and an empty description.code - the status codepublic Status(java.lang.String code,
java.lang.String description)
Status instance with the given code and description.code - the status codedescription - a description of the statuspublic java.lang.String getCode()
public java.lang.String getDescription()
public boolean equals(java.lang.Object obj)
equals 在类中 java.lang.Objectpublic int hashCode()
hashCode 在类中 java.lang.Objectpublic java.lang.String toString()
toString 在类中 java.lang.Object