Class HealthCheckHandler
- All Implemented Interfaces:
Handler<RoutingContext>, io.vertx.lang.rx.RxDelegate
- 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 -
Constructor Summary
ConstructorsConstructorDescriptionHealthCheckHandler(HealthCheckHandler delegate) HealthCheckHandler(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 HealthCheckHandlerCreates an instance of the default implementation of theHealthCheckHandler.static HealthCheckHandlercreateWithHealthChecks(HealthChecks hc, AuthenticationProvider provider) Creates an instance of the default implementation of theHealthCheckHandler.booleanvoidhandle(RoutingContext event) Something has happened, so handle it.inthashCode()static HealthCheckHandlerRegisters a health check procedure.Registers a health check procedure.resultMapper(Function<CheckResult, Single<CheckResult>> resultMapper) Sets a function which will be invoked before the gets written to clients.toString()unregister(String name) Unregisters a procedure.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
HealthCheckHandler
-
HealthCheckHandler
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
handle
Something has happened, so handle it.- Specified by:
handlein interfaceHandler<RoutingContext>- Parameters:
event- the event to handle
-
create
Creates an instance of the default implementation of theHealthCheckHandler. This function creates a new instance of .- 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 of .- Parameters:
vertx- the Vert.x instance, must not benull- Returns:
- the created instance
-
createWithHealthChecks
public static HealthCheckHandler createWithHealthChecks(HealthChecks hc, AuthenticationProvider provider) Creates an instance of the default implementation of theHealthCheckHandler.- Parameters:
hc- the health checks object to use, must not benullprovider-- 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
Registers a health check procedure.The procedure is a taking a of 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) , the procedure outcome is the received status.
This method uses a 1s timeout. To configure the timeout use
register(String, Handler).- Parameters:
name- the name of the procedure, must not benullor emptyprocedure- the procedure, must not benull- Returns:
- the current
HealthCheckHandler
-
register
Registers a health check procedure.The procedure is a taking a of 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) , 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
Sets a function which will be invoked before the gets written to clients.- Parameters:
resultMapper- the used to manipulate the ,nullmeans no result mapper function enabled.- Returns:
- the current
HealthCheckHandler
-
newInstance
-