public class HealthCheckHandlerImpl extends Object implements HealthCheckHandler
| Constructor and Description |
|---|
HealthCheckHandlerImpl(HealthChecks hc,
AuthProvider provider) |
HealthCheckHandlerImpl(Vertx vertx,
AuthProvider provider) |
| Modifier and Type | Method and Description |
|---|---|
void |
handle(RoutingContext rc)
Something has happened, so handle it.
|
HealthCheckHandler |
register(String name,
Handler<Promise<Status>> procedure)
Registers a health check procedure.
|
HealthCheckHandler |
register(String name,
long timeout,
Handler<Promise<Status>> procedure)
Registers a health check procedure.
|
HealthCheckHandler |
unregister(String name)
Unregisters a procedure.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, createWithHealthChecks, createWithHealthCheckspublic HealthCheckHandlerImpl(Vertx vertx, AuthProvider provider)
public HealthCheckHandlerImpl(HealthChecks hc, AuthProvider provider)
public HealthCheckHandler register(String name, Handler<Promise<Status>> procedure)
HealthCheckHandler
The procedure is a Handler taking a Promise of Status as parameter. Procedures are
asynchronous, and must complete or fail the given Promise. 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. To configure the timeout use HealthCheckHandler.register(String, long, Handler).
register in interface HealthCheckHandlername - the name of the procedure, must not be null or emptyprocedure - the procedure, must not be nullHealthCheckHandlerpublic HealthCheckHandler register(String name, long timeout, Handler<Promise<Status>> procedure)
HealthCheckHandler
The procedure is a Handler taking a Promise of Status as parameter. Procedures are
asynchronous, and must complete or fail the given Promise. 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.
register in interface HealthCheckHandlername - the name of the procedure, must not be null or emptytimeout - the procedure timeoutprocedure - the procedure, must not be nullHealthCheckHandlerpublic void handle(RoutingContext rc)
Handlerhandle in interface Handler<RoutingContext>rc - the event to handlepublic HealthCheckHandler unregister(String name)
HealthCheckHandlerunregister in interface HealthCheckHandlername - the name of the procedureHealthCheckHandlerCopyright © 2020. All rights reserved.