public interface HealthCheckRegistry extends HealthCheckRepository, CamelContextAware
Modifier and Type | Method and Description |
---|---|
boolean |
addRepository(HealthCheckRepository repository)
Add an Health Check repository.
|
static HealthCheckRegistry |
get(CamelContext context)
Returns an optional
HealthCheckRegistry , by default no registry is
present and it must be explicit activated. |
default Optional<HealthCheck> |
getCheck(String id)
Returns the check identified by the given
id if available. |
default Collection<String> |
getCheckIDs()
A collection of health check IDs.
|
Collection<HealthCheckRepository> |
getRepositories()
Get a collection of health check repositories.
|
boolean |
register(HealthCheck check)
Registers a service
HealthCheck . |
boolean |
removeRepository(HealthCheckRepository repository)
Remove an Health Check repository.
|
void |
setRepositories(Collection<HealthCheckRepository> repositories)
Set the health check repositories to use..
|
boolean |
unregister(HealthCheck check)
Unregisters a service
HealthCheck . |
stream
getCamelContext, setCamelContext, trySetCamelContext
boolean register(HealthCheck check)
HealthCheck
.boolean unregister(HealthCheck check)
HealthCheck
.void setRepositories(Collection<HealthCheckRepository> repositories)
Collection<HealthCheckRepository> getRepositories()
boolean addRepository(HealthCheckRepository repository)
boolean removeRepository(HealthCheckRepository repository)
default Collection<String> getCheckIDs()
default Optional<HealthCheck> getCheck(String id)
id
if available.static HealthCheckRegistry get(CamelContext context)
HealthCheckRegistry
, by default no registry is
present and it must be explicit activated. Components can register/unregister
health checks in response to life-cycle events (i.e. start/stop).
This registry is not used by the camel context but it is up to the impl to
properly use it, i.e.
- a RouteController could use the registry to decide to restart a route
with failing health checks
- spring boot could integrate such checks within its health endpoint or
make it available only as separate endpoint.Apache Camel