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
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. |
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. |
|
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. |
|
open fun getData(): JsonObject |
|
open fun isOk(): Boolean |
|
open fun isProcedureInError(): Boolean |
|
open fun setData(data: JsonObject): Status
Sets the metadata. |
|
open fun setKO(): Status
Sets the outcome of the status to KO. |
|
open fun setOK(): Status
Sets the outcome of the status to OK. |
|
open fun setOk(ok: Boolean): Status
Sets whether or not the current status is positive (UP) or negative (DOWN). |
|
open fun setProcedureInError(procedureInError: Boolean): Status
Sets whether or not the procedure attached to this status has failed (timeout, error...). |
|
open fun toJson(): JsonObject
Builds the JSON representation of the current Status instance. |