All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.actuate.health.checker.LivenessHealthIndicator Maven / Gradle / Ivy

The newest version!
package org.zodiac.actuate.health.checker;

import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health;

public class LivenessHealthIndicator extends AbstractHealthIndicator {

    private LivenessHealthCheckerProcessor livenessHealthCheckProcessor;

    public LivenessHealthIndicator(LivenessHealthCheckerProcessor livenessHealthCheckProcessor) {
        this.livenessHealthCheckProcessor = livenessHealthCheckProcessor;
    }

    @Override
    protected void doHealthCheck(Health.Builder builder) throws Exception {
        Health health = livenessHealthCheckProcessor.healthCheck();
        builder.status(health.getStatus()).withDetails(health.getDetails());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy