Class ConstantHealthCheck

  • All Implemented Interfaces:
    org.eclipse.microprofile.health.HealthCheck

    public class ConstantHealthCheck
    extends Object
    implements org.eclipse.microprofile.health.HealthCheck
    A simple HealthCheck implementation that always returns the same response.
    • Method Detail

      • call

        public org.eclipse.microprofile.health.HealthCheckResponse call()
        Specified by:
        call in interface org.eclipse.microprofile.health.HealthCheck
      • up

        public static org.eclipse.microprofile.health.HealthCheck up​(String name)
        Obtain a HealthCheck that always returns a status of up.
        Parameters:
        name - the service name that the health check is for
        Returns:
        a HealthCheck that always returns a status of up
      • down

        public static org.eclipse.microprofile.health.HealthCheck down​(String name)
        Obtain a HealthCheck that always returns a status of down.
        Parameters:
        name - the service name that the health check is for
        Returns:
        a HealthCheck that always returns a status of down