@Experimental(value="Programmatic Health API")
public interface HealthRegistry
Programmatic API for the dynamic registrations and removals of health check procedures.
The HealthRegistry can be injected as a CDI bean with two qualifiers:
@Inject @Liveness HealthRegistry livenessHealthRegistry;
@Inject @Readiness HealthRegistry readinessHealthRegistry;
| Modifier and Type | Method and Description |
|---|---|
default HealthRegistry |
register(AsyncHealthCheck asyncHealthCheck)
Asynchronous variant of
register(HealthCheck). |
default HealthRegistry |
register(org.eclipse.microprofile.health.HealthCheck healthCheck)
Programmatic registration of a
HealthCheck intances with the id set to
to the health check class name. |
HealthRegistry |
register(String id,
AsyncHealthCheck asyncHealthCheck)
Asynchronous variant of the
register(String, HealthCheck). |
HealthRegistry |
register(String id,
org.eclipse.microprofile.health.HealthCheck healthCheck)
Programmatic registration of a
HealthCheck instances. |
default HealthRegistry |
remove(AsyncHealthCheck asyncHealthCheck)
Asynchronous variant of
remove(HealthCheck). |
default HealthRegistry |
remove(org.eclipse.microprofile.health.HealthCheck healthCheck)
Programmatic removal of a programmatically registered
HealthCheck instances with the id set to
the the health check class name. |
HealthRegistry |
remove(String id)
Programmatic removal of a programmatically registered check
(
HealthCheck or AsyncHealthCheck) instances. |
HealthRegistry register(String id, org.eclipse.microprofile.health.HealthCheck healthCheck)
HealthCheck instances.id - the id of the registered check which can be later used for its removalhealthCheck - the HealthCheck instance to be registeredIllegalStateException - if the HealthCheck instance cannot be registeredHealthRegistry register(String id, AsyncHealthCheck asyncHealthCheck)
register(String, HealthCheck).id - the id of the registered asynchronous check which can be later used for its removalasyncHealthCheck - the AsyncHealthCheck instance to be registeredIllegalStateException - if the HealthCheck instance cannot be registereddefault HealthRegistry register(org.eclipse.microprofile.health.HealthCheck healthCheck)
HealthCheck intances with the id set to
to the health check class name.healthCheck - the HealthCheck instance to be registeredIllegalStateException - if the HealthCheck instance cannot be registereddefault HealthRegistry register(AsyncHealthCheck asyncHealthCheck)
register(HealthCheck).asyncHealthCheck - the AsyncHealthCheck instance to be registeredIllegalStateException - if the HealthCheck instance cannot be registeredHealthRegistry remove(String id)
HealthCheck or AsyncHealthCheck) instances.id - the id of the registered check to be removedIllegalStateException - if the HealthCheck instance cannot be removeddefault HealthRegistry remove(org.eclipse.microprofile.health.HealthCheck healthCheck)
HealthCheck instances with the id set to
the the health check class name.healthCheck - the HealthCheck instance to be removedIllegalStateException - if the HealthCheck instance cannot be removeddefault HealthRegistry remove(AsyncHealthCheck asyncHealthCheck)
remove(HealthCheck).asyncHealthCheck - the AsyncHealthCheck instance to be removedIllegalStateException - if the HealthCheck instance cannot be removedCopyright © 2018–2022. All rights reserved.