Class HealthChecks


  • public class HealthChecks
    extends Object

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

    • Constructor Detail

      • HealthChecks

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

        public HealthChecks​(Object delegate)
    • Method Detail

      • hashCode

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

        public io.vertx.ext.healthchecks.HealthChecks getDelegate()
      • create

        public static HealthChecks create​(Vertx vertx)
        Creates a new instance of the default implementation of HealthChecks.
        Parameters:
        vertx - the instance of Vert.x, must not be null
        Returns:
        the created instance
      • register

        public HealthChecks register​(String name,
                                     io.vertx.core.Handler<Promise<io.vertx.ext.healthchecks.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.

        This method uses a 1s timeout. Use register(java.lang.String, io.vertx.core.Handler<io.vertx.reactivex.core.Promise<io.vertx.ext.healthchecks.Status>>) to configure the timeout.

        Parameters:
        name - the name of the procedure, must not be null or empty
        procedure - the procedure, must not be null
        Returns:
        the current HealthChecks
      • register

        public HealthChecks register​(String name,
                                     long timeout,
                                     io.vertx.core.Handler<Promise<io.vertx.ext.healthchecks.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
        timeout - the procedure timeout in milliseconds
        procedure - the procedure, must not be null
        Returns:
        the current HealthChecks
      • unregister

        public HealthChecks unregister​(String name)
        Unregisters a procedure.
        Parameters:
        name - the name of the procedure
        Returns:
        the current HealthChecks
      • invoke

        public HealthChecks invoke​(io.vertx.core.Handler<io.vertx.core.json.JsonObject> resultHandler)
        Invokes the registered procedures and computes the outcome.
        Parameters:
        resultHandler - the result handler, must not be null. The handler received the computed .
        Returns:
        the current HealthChecks
      • invoke

        public HealthChecks invoke​(String name,
                                   io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>> resultHandler)
        Invokes the registered procedure with the given name and sub-procedures. It computes the overall outcome.
        Parameters:
        name -
        resultHandler - the result handler, must not be null. The handler received an marked as failed if the procedure with the given name cannot be found or invoked.
        Returns:
        the current HealthChecks
      • invoke

        public HealthChecks invoke​(String name)
        Invokes the registered procedure with the given name and sub-procedures. It computes the overall outcome.
        Parameters:
        name -
        Returns:
        the current HealthChecks
      • rxInvoke

        public io.reactivex.Single<io.vertx.core.json.JsonObject> rxInvoke​(String name)
        Invokes the registered procedure with the given name and sub-procedures. It computes the overall outcome.
        Parameters:
        name -
        Returns:
        the current HealthChecks
      • checkStatus

        public void checkStatus​(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.healthchecks.CheckResult>> resultHandler)
        Invokes the registered procedures.
        Parameters:
        resultHandler - the result handler, must not be null. The handler received the computed CheckResult.
      • checkStatus

        public void checkStatus()
        Invokes the registered procedures.
      • rxCheckStatus

        public io.reactivex.Single<io.vertx.ext.healthchecks.CheckResult> rxCheckStatus()
        Invokes the registered procedures.
        Returns:
      • checkStatus

        public void checkStatus​(String name,
                                io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.healthchecks.CheckResult>> resultHandler)
        Invokes the registered procedure with the given name and sub-procedures.
        Parameters:
        name -
        resultHandler - the result handler, must not be null. The handler received an marked as failed if the procedure with the given name cannot be found or invoked.
      • checkStatus

        public void checkStatus​(String name)
        Invokes the registered procedure with the given name and sub-procedures.
        Parameters:
        name -
      • rxCheckStatus

        public io.reactivex.Single<io.vertx.ext.healthchecks.CheckResult> rxCheckStatus​(String name)
        Invokes the registered procedure with the given name and sub-procedures.
        Parameters:
        name -
        Returns:
      • newInstance

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