class HealthState extends Object
| Modifier and Type | Field and Description |
|---|---|
Exception |
error
The error associated with a KO state.
|
boolean |
ok
Is the state OK or KO.
|
| Constructor and Description |
|---|
HealthState(boolean ok,
Exception error)
Creates a new instance of Health State.
|
| Modifier and Type | Method and Description |
|---|---|
static HealthState |
ko()
Creates a new KO Health State instance, without any information about the failure.
|
static HealthState |
ko(Exception e)
Creates a new KO Health State instance with an exception attached.
|
static HealthState |
ok()
Creates a new OK Health State instance.
|
public final boolean ok
public final Exception error
HealthState(boolean ok,
Exception error)
ok - whether or not the health is okerror - an optional error when the health check is KO.public static HealthState ok()
public static HealthState ko()
public static HealthState ko(Exception e)
e - the exceptionCopyright © 2013–2015 Wisdom Framework. All rights reserved.