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
Convenient constant value representing down state.
|
static Status |
OUT_OF_SERVICE
Convenient constant value representing out-of-service state.
|
static Status |
UNKNOWN
Convenient constant value representing unknown state.
|
static Status |
UP
Convenient constant value representing up state.
|
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
public static final Status UP
public static final Status DOWN
public static final Status OUT_OF_SERVICE
public Status(String code)
Status
instance with the given code and an empty description.code
- the status codeCopyright © 2015 Pivotal Software, Inc.. All rights reserved.