public final class HealthCheckHelper extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getGroup(HealthCheck check)
Get the group of the given check or an empty string if the group is not set.
|
static Collection<HealthCheck.Result> |
invoke(CamelContext camelContext)
Invokes the checks and returns a collection of results.
|
static Collection<HealthCheck.Result> |
invoke(CamelContext camelContext,
Function<HealthCheck,Map<String,Object>> optionsSupplier)
Invokes the checks and returns a collection of results.
|
static Collection<HealthCheck.Result> |
invoke(CamelContext camelContext,
Function<HealthCheck,Map<String,Object>> optionsSupplier,
HealthCheckFilter filter)
Invokes the checks and returns a collection of results.
|
static Collection<HealthCheck.Result> |
invoke(CamelContext camelContext,
HealthCheckFilter filter)
Invokes the checks and returns a collection of results.
|
static Optional<HealthCheck.Result> |
invoke(CamelContext camelContext,
String id,
Map<String,Object> options)
Invoke a check by id.
|
static Optional<HealthCheck.Result> |
query(CamelContext camelContext,
String id,
Map<String,Object> options)
Query the status of a check by id.
|
public static String getGroup(HealthCheck check)
check
- the health checkHasGroup.getGroup()
or an empty string if it is null
public static Collection<HealthCheck.Result> invoke(CamelContext camelContext)
public static Collection<HealthCheck.Result> invoke(CamelContext camelContext, Function<HealthCheck,Map<String,Object>> optionsSupplier)
public static Collection<HealthCheck.Result> invoke(CamelContext camelContext, HealthCheckFilter filter)
public static Collection<HealthCheck.Result> invoke(CamelContext camelContext, Function<HealthCheck,Map<String,Object>> optionsSupplier, HealthCheckFilter filter)
camelContext
- the camel context.optionsSupplier
- a supplier for options.filter
- filter to exclude some checks.public static Optional<HealthCheck.Result> query(CamelContext camelContext, String id, Map<String,Object> options)
HealthCheck
, i.e. when no HealthCheckService
is available.camelContext
- the camel context.id
- the check id.options
- the check options.HealthCheck.Result
.public static Optional<HealthCheck.Result> invoke(CamelContext camelContext, String id, Map<String,Object> options)
camelContext
- the camel context.id
- the check id.options
- the check options.HealthCheck.Result
.Apache Camel