io.vertx.rxjava.ext.healthchecks

## Class HealthCheckHandler

- java.lang.Object
- - io.vertx.rxjava.ext.healthchecks.HealthCheckHandler

- All Implemented Interfaces:
    Handler<RoutingContext>

      public class HealthCheckHandler
      extends Object
      implements 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 `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TypeArg<HealthCheckHandler>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HealthCheckHandler(HealthCheckHandler delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static HealthCheckHandler` | `create(Vertx vertx)` Creates an instance of the default implementation of the `HealthCheckHandler`.
    `static HealthCheckHandler` | `create(Vertx vertx, AuthProvider provider)` Creates an instance of the default implementation of the `HealthCheckHandler`.
    `static HealthCheckHandler` | `createWithHealthChecks(HealthChecks hc)` Creates an instance of the default implementation of the `HealthCheckHandler`.
    `static HealthCheckHandler` | `createWithHealthChecks(HealthChecks hc, AuthProvider provider)` Creates an instance of the default implementation of the `HealthCheckHandler`.
    `HealthCheckHandler` | `getDelegate()`
    `void` | `handle(RoutingContext arg0)` Something has happened, so handle it.
    `static HealthCheckHandler` | `newInstance(HealthCheckHandler arg)`
    `HealthCheckHandler` | `register(String name, Handler<Future<Status>> procedure)` Registers a health check procedure.
    `HealthCheckHandler` | `unregister(String name)` Unregisters a procedure.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final TypeArg<HealthCheckHandler> __TYPE_ARG

  - ### Constructor Detail

    - #### HealthCheckHandler

          public HealthCheckHandler(HealthCheckHandler delegate)

  - ### Method Detail

    - #### getDelegate

          public HealthCheckHandler getDelegate()

    - #### handle

          public void handle(RoutingContext arg0)

      Description copied from interface: `Handler`
      Something has happened, so handle it.
      Specified by:
        `handle` in interface `Handler<RoutingContext>`
      Parameters:
        `arg0` - the event to handle

    - #### create

          public static HealthCheckHandler create(Vertx vertx,
                                                  AuthProvider provider)

      Creates an instance of the default implementation of the `HealthCheckHandler`. This function creates a new instance of `HealthChecks`.
      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)

      Creates an instance of the default implementation of the `HealthCheckHandler`. This function creates a new instance of `HealthChecks`.
      Parameters:
        `vertx` - the Vert.x instance, must not be `null`
      Returns:
        the created instance

    - #### createWithHealthChecks

          public static HealthCheckHandler createWithHealthChecks(HealthChecks hc,
                                                                  AuthProvider provider)

      Creates an instance of the default implementation of the `HealthCheckHandler`.
      Parameters:
        `hc` - the health checks object to use, must not be `null`
        `provider` -
      Returns:
        the created instance

    - #### createWithHealthChecks

          public static HealthCheckHandler createWithHealthChecks(HealthChecks hc)

      Creates an instance of the default implementation of the `HealthCheckHandler`.
      Parameters:
        `hc` - the health checks object to use
      Returns:
        the created instance

    - #### register

          public HealthCheckHandler register(String name,
                                             Handler<Future<Status>> procedure)

      Registers a health check procedure.

      The procedure is a taking a of `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) `Status`, the procedure outcome is the received status.

      Parameters:
        `name` - the name of the procedure, must not be `null` or empty
        `procedure` - the procedure, must not be `null`
      Returns:
        the current `HealthCheckHandler`

    - #### unregister

          public HealthCheckHandler unregister(String name)

      Unregisters a procedure.
      Parameters:
        `name` - the name of the procedure
      Returns:
        the current `HealthCheckHandler`

    - #### newInstance

          public static HealthCheckHandler newInstance(HealthCheckHandler arg)

Copyright © 2017. All rights reserved.