Class HealthCheckHandler

  • All Implemented Interfaces:
    io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>

    public class HealthCheckHandler
    extends Object
    implements io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
    A Vert.x Web handler on which you register health check procedure. It computes the outcome status (`UP` or `DOWN`) . When the handler process a HTTP request, it computes the global outcome and build a HTTP response as follows:

    • 204 - status is `UP` but no procedures installed (no payload)
    • 200 - status is `UP`, the payload contains the result of the installed procedures
    • 503 - status is `DOWN`, the payload contains the result of the installed procedures
    • 500 - status is `DOWN`, the payload contains the result of the installed procedures, one of the procedure has failed

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • HealthCheckHandler

        public HealthCheckHandler​(io.vertx.ext.healthchecks.HealthCheckHandler delegate)
      • HealthCheckHandler

        public HealthCheckHandler​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.ext.healthchecks.HealthCheckHandler getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • create

        public static HealthCheckHandler create​(Vertx vertx,
                                                AuthenticationProvider provider)
        Parameters:
        vertx - the Vert.x instance, must not be null
        provider - the Authentication provider used to authenticate the HTTP request
        Returns:
        the created instance
      • create

        public static HealthCheckHandler create​(Vertx vertx)
        Parameters:
        vertx - the Vert.x instance, must not be null
        Returns:
        the created instance
      • createWithHealthChecks

        public static HealthCheckHandler createWithHealthChecks​(HealthChecks hc)
        Parameters:
        hc - the health checks object to use
        Returns:
        the created instance
      • register

        public HealthCheckHandler register​(String name,
                                           io.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.Status> procedure)
        Parameters:
        name - the name of the procedure, must not be null or empty
        procedure - the procedure, must not be null
        Returns:
      • register

        public HealthCheckHandler register​(String name,
                                           long timeout,
                                           io.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.Status> procedure)
        Parameters:
        name - the name of the procedure, must not be null or empty
        timeout - the procedure timeout
        procedure - the procedure, must not be null
        Returns:
      • newInstance

        public static HealthCheckHandler newInstance​(io.vertx.ext.healthchecks.HealthCheckHandler arg)