Class RequestExtractor
- All Implemented Interfaces:
MutinyDelegate
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRequestExtractor(io.vertx.ext.web.openapi.router.RequestExtractor delegate) RequestExtractor(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbooleanio.smallrye.mutiny.Uni<ValidatableRequest>extractValidatableRequest(RoutingContext routingContext, Operation operation) Extracts and transforms the parameters and the body of an incoming request into a that can be validated by theRequestValidator.extractValidatableRequestAndAwait(RoutingContext routingContext, Operation operation) voidextractValidatableRequestAndForget(RoutingContext routingContext, Operation operation) Variant ofextractValidatableRequest(io.vertx.mutiny.ext.web.RoutingContext,io.vertx.mutiny.openapi.contract.Operation)that ignores the result of the operation.io.vertx.ext.web.openapi.router.RequestExtractorinthashCode()static RequestExtractornewInstance(io.vertx.ext.web.openapi.router.RequestExtractor arg) toString()static RequestExtractor
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
RequestExtractor
public RequestExtractor(io.vertx.ext.web.openapi.router.RequestExtractor delegate) -
RequestExtractor
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.openapi.router.RequestExtractor getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
extractValidatableRequest
@CheckReturnValue public io.smallrye.mutiny.Uni<ValidatableRequest> extractValidatableRequest(RoutingContext routingContext, Operation operation) Extracts and transforms the parameters and the body of an incoming request into a that can be validated by theRequestValidator.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
routingContext- The routing context of the incoming request.operation- The operation of the related request.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
extractValidatableRequestAndAwait
public ValidatableRequest extractValidatableRequestAndAwait(RoutingContext routingContext, Operation operation) Blocking variant ofextractValidatableRequest(io.vertx.mutiny.ext.web.RoutingContext,io.vertx.mutiny.openapi.contract.Operation).This method waits 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 a RuntimeException).
- Parameters:
routingContext- The routing context of the incoming request.operation- The operation of the related request.- Returns:
- the ValidatableRequest instance produced by the operation.
-
extractValidatableRequestAndForget
Variant ofextractValidatableRequest(io.vertx.mutiny.ext.web.RoutingContext,io.vertx.mutiny.openapi.contract.Operation)that ignores the result of the operation.This method subscribes on the result of
extractValidatableRequest(io.vertx.mutiny.ext.web.RoutingContext,io.vertx.mutiny.openapi.contract.Operation), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromextractValidatableRequest(io.vertx.mutiny.ext.web.RoutingContext,io.vertx.mutiny.openapi.contract.Operation)but you don't need to compose it with other operations.- Parameters:
routingContext- The routing context of the incoming request.operation- The operation of the related request.
-
withBodyHandler
- Returns:
- a RequestExtractor that works in case that a BodyHandler was applied to the related route.
-
newInstance
-