Package com.github.jpmsilva.jsystemd
Class SystemdActuatorHealthProvider
java.lang.Object
com.github.jpmsilva.jsystemd.SystemdActuatorHealthProvider
- All Implemented Interfaces:
HealthProvider,SystemdStatusProvider
@Order(2000)
public class SystemdActuatorHealthProvider
extends Object
implements SystemdStatusProvider, HealthProvider
Implementation of
HealthProvider that provides application health based on Spring Boot Actuator Health Indicators.- Author:
- Christian Lorenz
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.jpmsilva.jsystemd.HealthProvider
HealthProvider.Health -
Constructor Summary
ConstructorsConstructorDescriptionSystemdActuatorHealthProvider(@NotNull List<org.springframework.boot.actuate.health.HealthIndicator> healthIndicators, @NotNull Set<org.springframework.boot.actuate.health.Status> unhealthyStatusCodes) Creates a new instance using the providedHealthIndicatorandStatus. -
Method Summary
-
Constructor Details
-
SystemdActuatorHealthProvider
public SystemdActuatorHealthProvider(@NotNull @NotNull List<org.springframework.boot.actuate.health.HealthIndicator> healthIndicators, @NotNull @NotNull Set<org.springframework.boot.actuate.health.Status> unhealthyStatusCodes) Creates a new instance using the providedHealthIndicatorandStatus.HealthIndicatorare used to determine the health of the application, whereasStatusindicate which status should be considered as unhealthy.- Parameters:
healthIndicators- Spring Boot Actuator Health IndicatorsunhealthyStatusCodes- list of status codes considered as unhealthy
-
-
Method Details
-
health
Description copied from interface:HealthProviderDetermines if an application is healthy.- Specified by:
healthin interfaceHealthProvider- Returns:
- representation of the application
HealthProvider.Healthstate
-
status
Description copied from interface:SystemdStatusProviderExposes status information to send to systemd.- Specified by:
statusin interfaceSystemdStatusProvider- Returns:
- the string message to add to the service status
-