public class HealthCheckHandler extends Object implements io.vertx.core.Handler<RoutingContext>
original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static TypeArg<HealthCheckHandler> |
__TYPE_ARG |
| Constructor and Description |
|---|
HealthCheckHandler(io.vertx.ext.healthchecks.HealthCheckHandler delegate) |
HealthCheckHandler(Object delegate) |
| 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,
AuthenticationProvider 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,
AuthenticationProvider provider)
Creates an instance of the default implementation of the
HealthCheckHandler. |
boolean |
equals(Object o) |
io.vertx.ext.healthchecks.HealthCheckHandler |
getDelegate() |
void |
handle(RoutingContext event)
Something has happened, so handle it.
|
int |
hashCode() |
static HealthCheckHandler |
newInstance(io.vertx.ext.healthchecks.HealthCheckHandler arg) |
HealthCheckHandler |
register(String name,
io.vertx.core.Handler<Promise<io.vertx.ext.healthchecks.Status>> procedure)
Registers a health check procedure.
|
HealthCheckHandler |
register(String name,
long timeout,
io.vertx.core.Handler<Promise<io.vertx.ext.healthchecks.Status>> procedure)
Registers a health check procedure.
|
HealthCheckHandler |
resultMapper(Function<io.vertx.ext.healthchecks.CheckResult,io.reactivex.rxjava3.core.Single<io.vertx.ext.healthchecks.CheckResult>> resultMapper)
Sets a function which will be invoked before the
CheckResult gets written to clients. |
String |
toString() |
HealthCheckHandler |
unregister(String name)
Unregisters a procedure.
|
public static final TypeArg<HealthCheckHandler> __TYPE_ARG
public HealthCheckHandler(io.vertx.ext.healthchecks.HealthCheckHandler delegate)
public HealthCheckHandler(Object delegate)
public io.vertx.ext.healthchecks.HealthCheckHandler getDelegate()
public void handle(RoutingContext event)
handle in interface io.vertx.core.Handler<RoutingContext>event - the event to handlepublic static HealthCheckHandler create(Vertx vertx, AuthenticationProvider provider)
HealthCheckHandler.
This function creates a new instance of HealthChecks.vertx - the Vert.x instance, must not be nullprovider - the Authentication provider used to authenticate the HTTP requestpublic static HealthCheckHandler create(Vertx vertx)
HealthCheckHandler.
This function creates a new instance of HealthChecks.vertx - the Vert.x instance, must not be nullpublic static HealthCheckHandler createWithHealthChecks(HealthChecks hc, AuthenticationProvider provider)
HealthCheckHandler.hc - the health checks object to use, must not be nullprovider - public static HealthCheckHandler createWithHealthChecks(HealthChecks hc)
HealthCheckHandler.hc - the health checks object to usepublic HealthCheckHandler register(String name, io.vertx.core.Handler<Promise<io.vertx.ext.healthchecks.Status>> 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. To configure the timeout use register(java.lang.String, io.vertx.core.Handler<io.vertx.rxjava3.core.Promise<io.vertx.ext.healthchecks.Status>>).
name - the name of the procedure, must not be null or emptyprocedure - the procedure, must not be nullHealthCheckHandlerpublic HealthCheckHandler register(String name, long timeout, io.vertx.core.Handler<Promise<io.vertx.ext.healthchecks.Status>> 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.
name - the name of the procedure, must not be null or emptytimeout - the procedure timeoutprocedure - the procedure, must not be nullHealthCheckHandlerpublic HealthCheckHandler unregister(String name)
name - the name of the procedureHealthCheckHandlerpublic HealthCheckHandler resultMapper(Function<io.vertx.ext.healthchecks.CheckResult,io.reactivex.rxjava3.core.Single<io.vertx.ext.healthchecks.CheckResult>> resultMapper)
CheckResult gets written to clients.resultMapper - the used to manipulate the CheckResult, null means no result mapper function enabled.HealthCheckHandlerpublic static HealthCheckHandler newInstance(io.vertx.ext.healthchecks.HealthCheckHandler arg)
Copyright © 2022 Eclipse. All rights reserved.