Class CredentialMonitorHealthIndicator
java.lang.Object
se.swedenconnect.security.credential.spring.actuator.CredentialMonitorHealthIndicator
- All Implemented Interfaces:
org.springframework.boot.actuate.health.HealthContributor,org.springframework.boot.actuate.health.HealthIndicator
public class CredentialMonitorHealthIndicator
extends Object
implements org.springframework.boot.actuate.health.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
FieldsModifier and TypeFieldDescriptionstatic final org.springframework.boot.actuate.health.StatusCustom health status for warnings. -
Constructor Summary
ConstructorsConstructorDescriptionCredential assuming that monitor events will be published.CredentialMonitorHealthIndicator(List<ReloadablePkiCredential> credentials) Constructor setting up a monitor. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.boot.actuate.health.Healthhealth()Tests all configured credentials, and performs reload on those that fail tests.voidvoidvoidvoidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.boot.actuate.health.HealthIndicator
getHealth
-
Field Details
-
WARNING
public static final org.springframework.boot.actuate.health.Status WARNINGCustom 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
public org.springframework.boot.actuate.health.Health health()Tests all configured credentials, and performs reload on those that fail tests.- Specified by:
healthin interfaceorg.springframework.boot.actuate.health.HealthIndicator
-
onSuccessfulCredentialTestEvent
-
onFailedCredentialTestEvent
-
onSuccessfulCredentialReloadEvent
-
onFailedCredentialReloadEvent
-