Class CredentialMonitorHealthIndicator
java.lang.Object
se.swedenconnect.security.credential.spring.actuator.CredentialMonitorHealthIndicator
- All Implemented Interfaces:
HealthContributor
,HealthIndicator
A
HealthIndicator
for monitoring credentials.
The indicator can either work in a passive mode where it listens to monitor events (use
CredentialMonitorHealthIndicator()
), or in "active" mode where the indicator sets up a
CredentialMonitorBean
(use
CredentialMonitorHealthIndicator(List)
).
- Author:
- Martin Lindström
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCredential assuming that monitor events will be published.CredentialMonitorHealthIndicator
(List<ReloadablePkiCredential> credentials) Constructor setting up a monitor. -
Method Summary
Modifier and TypeMethodDescriptionhealth()
Tests all configured credentials, and performs reload on those that fail tests.void
void
void
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.boot.actuate.health.HealthIndicator
getHealth
-
Field Details
-
WARNING
Custom health status for warnings.
-
-
Constructor Details
-
CredentialMonitorHealthIndicator
public CredentialMonitorHealthIndicator()Credential assuming that monitor events will be published. -
CredentialMonitorHealthIndicator
Constructor setting up a monitor.- Parameters:
credentials
- the credentials to monitor
-
-
Method Details
-
health
Tests all configured credentials, and performs reload on those that fail tests.- Specified by:
health
in interfaceHealthIndicator
-
onSuccessfulCredentialTestEvent
-
onFailedCredentialTestEvent
-
onSuccessfulCredentialReloadEvent
-
onFailedCredentialReloadEvent
-