Class HealthCheckHandler
- All Implemented Interfaces:
MutinyDelegate,io.vertx.core.Handler<RoutingContext>,Consumer<RoutingContext>
- 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 Mutiny-ified interface.
- Author:
- Clement Escoffier
- See Also:
-
HealthCheckHandler
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHealthCheckHandler(io.vertx.ext.web.healthchecks.HealthCheckHandler delegate) Create a new instance ofHealthCheckHandlerdelegating to the given (non-null) instance ofHealthCheckHandler.HealthCheckHandler(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(RoutingContext item) Handle an item.static HealthCheckHandlerCreates an instance of the default implementation of theHealthCheckHandler.static HealthCheckHandlercreate(Vertx vertx, AuthenticationProvider provider) Creates an instance of the default implementation of theHealthCheckHandler.static HealthCheckHandlercreateWithHealthChecks(io.vertx.ext.healthchecks.HealthChecks hc) Creates an instance of the default implementation of theHealthCheckHandler.static HealthCheckHandlercreateWithHealthChecks(io.vertx.ext.healthchecks.HealthChecks hc, AuthenticationProvider provider) Creates an instance of the default implementation of theHealthCheckHandler.booleanio.vertx.ext.web.healthchecks.HealthCheckHandlerGet the delegate instance.voidhandle(RoutingContext item) Handle an item.inthashCode()static HealthCheckHandlernewInstance(io.vertx.ext.web.healthchecks.HealthCheckHandler delegate) Creates a new instance of theHealthCheckHandler.register(String name, long timeout, io.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.Status> procedure) Registers a health check procedure.Registers a health check procedure.resultMapper(Function<io.vertx.ext.healthchecks.CheckResult, io.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.CheckResult>> resultMapper) Sets a function which will be invoked before theCheckResultgets written to clients.toString()unregister(String name) Unregisters a procedure.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
HealthCheckHandler
public HealthCheckHandler(io.vertx.ext.web.healthchecks.HealthCheckHandler delegate) Create a new instance ofHealthCheckHandlerdelegating to the given (non-null) instance ofHealthCheckHandler. -
HealthCheckHandler
-
-
Method Details
-
accept
Handle an item. This method is generated from theoriginalmethod."- Specified by:
acceptin interfaceConsumer<RoutingContext>
-
handle
Handle an item. This method is generated from theoriginalmethod."- Specified by:
handlein interfaceio.vertx.core.Handler<RoutingContext>
-
getDelegate
public io.vertx.ext.web.healthchecks.HealthCheckHandler getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
create
Creates an instance of the default implementation of theHealthCheckHandler. This function creates a new instance ofHealthChecks.- Parameters:
vertx- the Vert.x instance, must not benullprovider- the Authentication provider used to authenticate the HTTP request- Returns:
- the created instance
-
create
Creates an instance of the default implementation of theHealthCheckHandler. This function creates a new instance ofHealthChecks.- Parameters:
vertx- the Vert.x instance, must not benull- Returns:
- the created instance
-
createWithHealthChecks
public static HealthCheckHandler createWithHealthChecks(io.vertx.ext.healthchecks.HealthChecks hc, AuthenticationProvider provider) Creates an instance of the default implementation of theHealthCheckHandler.- Parameters:
hc- the health checks object to use, must not benull- Returns:
- the created instance
-
createWithHealthChecks
Creates an instance of the default implementation of theHealthCheckHandler.- Parameters:
hc- the health checks object to use- Returns:
- the created instance
-
register
public HealthCheckHandler register(String name, io.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.Status> procedure) Registers a health check procedure.The procedure is a
Handlertaking aPromiseofStatusas parameter. Procedures are asynchronous, and must complete or fail the givenPromise. 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(String, long, Handler).- Parameters:
name- the name of the procedure, must not benullor emptyprocedure- the procedure, must not benull- Returns:
- the current
HealthCheckHandler
-
register
public HealthCheckHandler register(String name, long timeout, io.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.Status> procedure) Registers a health check procedure.The procedure is a
Handlertaking aPromiseofStatusas parameter. Procedures are asynchronous, and must complete or fail the givenPromise. 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 benullor emptytimeout- the procedure timeoutprocedure- the procedure, must not benull- Returns:
- the current
HealthCheckHandler
-
unregister
Unregisters a procedure.- Parameters:
name- the name of the procedure- Returns:
- the current
HealthCheckHandler
-
resultMapper
public HealthCheckHandler resultMapper(Function<io.vertx.ext.healthchecks.CheckResult, io.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.CheckResult>> resultMapper) Sets a function which will be invoked before theCheckResultgets written to clients.- Parameters:
resultMapper- theFunctionused to manipulate theCheckResult,nullmeans no result mapper function enabled.- Returns:
- the current
HealthCheckHandler
-
newInstance
public static HealthCheckHandler newInstance(io.vertx.ext.web.healthchecks.HealthCheckHandler delegate) Creates a new instance of theHealthCheckHandler. -
hashCode
public int hashCode() -
equals
-
toString
-