vertx / io.vertx.ext.healthchecks / Status

# Status

`open class Status`

Represents the outcome of a health check procedure. Each procedure produces a Status indicating either OK or KO. Optionally, it can also provide additional data.

Author
Clement Escoffier

### Constructors

<init> | `Status()` Creates a new instance of Status with default values. `Status(other: Status)` Creates a new instance of Status by copying the given Status. `Status(json: JsonObject)` Creates a new instance of Status from the given JSON structure.

### Functions

KO | `open static fun KO(): Status` Creates a status when something bad is detected. `open static fun KO(data: JsonObject): Status` Creates a status when something bad is detected. Also add some metadata.
OK | `open static fun OK(): Status` Creates a status when everything is fine. `open static fun OK(data: JsonObject): Status` Creates a status when everything is fine and adds metadata.
getData | `open fun getData(): JsonObject`
isOk | `open fun isOk(): Boolean`
isProcedureInError | `open fun isProcedureInError(): Boolean`
setData | `open fun setData(data: JsonObject): Status` Sets the metadata.
setKO | `open fun setKO(): Status` Sets the outcome of the status to KO.
setOK | `open fun setOK(): Status` Sets the outcome of the status to OK.
setOk | `open fun setOk(ok: Boolean): Status` Sets whether or not the current status is positive (UP) or negative (DOWN).
setProcedureInError | `open fun setProcedureInError(procedureInError: Boolean): Status` Sets whether or not the procedure attached to this status has failed (timeout, error...).
toJson | `open fun toJson(): JsonObject` Builds the JSON representation of the current Status instance.