vertx / io.vertx.reactivex.ext.healthchecks / HealthCheckHandler

# HealthCheckHandler

`open class HealthCheckHandler : Handler<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 io.vertx.ext.healthchecks.HealthCheckHandler non RX-ified interface using Vert.x codegen.

### Constructors

<init> | `HealthCheckHandler(delegate: HealthCheckHandler)`

### Properties

__TYPE_ARG | `static val __TYPE_ARG: TypeArg<HealthCheckHandler>`

### Functions

create | `open static fun create(vertx: Vertx, provider: AuthProvider): HealthCheckHandler` `open static fun create(vertx: Vertx): HealthCheckHandler` Creates an instance of the default implementation of the io.vertx.reactivex.ext.healthchecks.HealthCheckHandler. This function creates a new instance of io.vertx.reactivex.ext.healthchecks.HealthChecks.
createWithHealthChecks | `open static fun createWithHealthChecks(hc: HealthChecks, provider: AuthProvider): HealthCheckHandler` `open static fun createWithHealthChecks(hc: HealthChecks): HealthCheckHandler` Creates an instance of the default implementation of the io.vertx.reactivex.ext.healthchecks.HealthCheckHandler.
equals | `open fun equals(other: Any?): Boolean`
getDelegate | `open fun getDelegate(): HealthCheckHandler`
handle | `open fun handle(arg0: RoutingContext): Unit`
hashCode | `open fun hashCode(): Int`
newInstance | `open static fun newInstance(arg: HealthCheckHandler): HealthCheckHandler`
register | `open fun register(name: String, procedure: Handler<Future<Status>>): HealthCheckHandler` Registers a health check procedure. The procedure is a taking a of io.vertx.ext.healthchecks.Status as parameter. Procedures are asynchronous, and must complete or fail the given . If the future object is failed, the procedure outcome is considered as `DOWN`. If the future is completed without any object, the procedure outcome is considered as `UP`. If the future is completed with a (not-null) io.vertx.ext.healthchecks.Status, the procedure outcome is the received status. This method uses a 1s timeout. To configure the timeout use `io.vertx.reactivex.ext.healthchecks.HealthCheckHandler#register`. `open fun register(name: String, timeout: Long, procedure: Handler<Future<Status>>): HealthCheckHandler` Registers a health check procedure. The procedure is a taking a of io.vertx.ext.healthchecks.Status as parameter. Procedures are asynchronous, and must complete or fail the given . If the future object is failed, the procedure outcome is considered as `DOWN`. If the future is completed without any object, the procedure outcome is considered as `UP`. If the future is completed with a (not-null) io.vertx.ext.healthchecks.Status, the procedure outcome is the received status.
toString | `open fun toString(): String`
unregister | `open fun unregister(name: String): HealthCheckHandler` Unregisters a procedure.