Class HealthChecks
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Clement Escoffier
- See Also:
-
HealthChecks
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHealthChecks(io.vertx.ext.healthchecks.HealthChecks delegate) Create a new instance ofHealthChecksdelegating to the given (non-null) instance ofHealthChecks.HealthChecks(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.CheckResult>Invokes the registered procedures.io.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.CheckResult>checkStatus(String name) Invokes the registered procedure with the given name and sub-procedures.io.vertx.ext.healthchecks.CheckResultInvokes the registered procedures.io.vertx.ext.healthchecks.CheckResultcheckStatusAndAwait(String name) Invokes the registered procedure with the given name and sub-procedures.Invokes the registered procedures.checkStatusAndForget(String name) Invokes the registered procedure with the given name and sub-procedures.static HealthChecksCreates a new instance of the default implementation ofHealthChecks.booleanio.vertx.ext.healthchecks.HealthChecksGet the delegate instance.inthashCode()io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>Invokes the registered procedure with the given name and sub-procedures.Invokes the registered procedures and computes the outcome.io.vertx.core.json.JsonObjectinvokeAndAwait(String name) Invokes the registered procedure with the given name and sub-procedures.invokeAndForget(String name) Invokes the registered procedure with the given name and sub-procedures.static HealthChecksnewInstance(io.vertx.ext.healthchecks.HealthChecks delegate) Creates a new instance of theHealthChecks.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.toString()unregister(String name) Unregisters a procedure.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
HealthChecks
public HealthChecks(io.vertx.ext.healthchecks.HealthChecks delegate) Create a new instance ofHealthChecksdelegating to the given (non-null) instance ofHealthChecks. -
HealthChecks
-
-
Method Details
-
getDelegate
public io.vertx.ext.healthchecks.HealthChecks 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
-
invoke
Invokes the registered procedure with the given name and sub-procedures. It computes the overall outcome.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
HealthChecks.invoke(String)
-
invokeAndAwait
Invokes the registered procedure with the given name and sub-procedures. It computes the overall outcome.Unlike the bare Vert.x variant, this method returns a
JsonObject. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Returns:
- The operation result
- See Also:
-
HealthChecks.invoke(String)
-
invokeAndForget
Invokes the registered procedure with the given name and sub-procedures. It computes the overall outcome.Unlike the bare Vert.x variant, this method ignores the
JsonObjectresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
HealthChecks.invoke(String)
-
checkStatus
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.CheckResult> checkStatus()Invokes the registered procedures.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
HealthChecks.checkStatus()
-
checkStatusAndAwait
public io.vertx.ext.healthchecks.CheckResult checkStatusAndAwait()Invokes the registered procedures.Unlike the bare Vert.x variant, this method returns a
CheckResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Returns:
- The operation result
- See Also:
-
HealthChecks.checkStatus()
-
checkStatusAndForget
Invokes the registered procedures.Unlike the bare Vert.x variant, this method ignores the
CheckResultresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
HealthChecks.checkStatus()
-
checkStatus
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.healthchecks.CheckResult> checkStatus(String name) Invokes the registered procedure with the given name and sub-procedures.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
HealthChecks.checkStatus(String)
-
checkStatusAndAwait
Invokes the registered procedure with the given name and sub-procedures.Unlike the bare Vert.x variant, this method returns a
CheckResult. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Returns:
- The operation result
- See Also:
-
HealthChecks.checkStatus(String)
-
checkStatusAndForget
Invokes the registered procedure with the given name and sub-procedures.Unlike the bare Vert.x variant, this method ignores the
CheckResultresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
HealthChecks.checkStatus(String)
-
create
Creates a new instance of the default implementation ofHealthChecks.- Parameters:
vertx- the instance of Vert.x, must not benull- Returns:
- the created instance
-
register
public HealthChecks 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. Use
#register(String, long, Handler)to configure the timeout.- Parameters:
name- the name of the procedure, must not benullor emptyprocedure- the procedure, must not benull- Returns:
- the current
HealthChecks
-
register
public HealthChecks 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 timeout in millisecondsprocedure- the procedure, must not benull- Returns:
- the current
HealthChecks
-
unregister
Unregisters a procedure.- Parameters:
name- the name of the procedure- Returns:
- the current
HealthChecks
-
invoke
Invokes the registered procedures and computes the outcome.- Parameters:
resultHandler- the result handler, must not benull. The handler received the computedJsonObject.- Returns:
- the current
HealthChecks
-
newInstance
Creates a new instance of theHealthChecks. -
hashCode
public int hashCode() -
equals
-
toString
-