Class RouterBuilder
- java.lang.Object
- 
- io.vertx.reactivex.ext.web.openapi.router.RouterBuilder
 
- 
- All Implemented Interfaces:
- io.vertx.lang.rx.RxDelegate
 
 public class RouterBuilder extends Object implements io.vertx.lang.rx.RxDelegate Interface to build a Vert.x Web from an OpenAPI 3 contract. The router is mounting its handlers in the following order:- RootHandler in the order the root handlers were added to the RouterBuilder.
- ValidationHandler This handler is implementing the marker interface
- UserHandler The custom user handlers defined in the
- FailureHandler The failure handlers defined in the
 InputTrustHandler. Because of this, all handlers of type PLATFORM, SECURITY_POLICY, BODY and AUTHENTICATION must be mounted as root handlers if required.OpenAPIRoutein the same order as they are added to the route.OpenAPIRoutein the same order as they are added to the route.NOTE: This class has been automatically generated from the originalnon RX-ified interface using Vert.x codegen.
- 
- 
Field SummaryFields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<RouterBuilder>__TYPE_ARGstatic StringKEY_META_DATA_OPERATIONstatic StringKEY_META_DATA_VALIDATED_REQUEST
 - 
Constructor SummaryConstructors Constructor Description RouterBuilder(RouterBuilder delegate)RouterBuilder(Object delegate)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RouterBuildercreate(Vertx vertx, OpenAPIContract contract)Create a newRouterBuilder.static RouterBuildercreate(Vertx vertx, OpenAPIContract contract, RequestExtractor extractor)Create a newRouterBuilder.RoutercreateRouter()Construct a new router based on the related OpenAPI contract.booleanequals(Object o)RouterBuildergetDelegate()OpenAPIRoutegetRoute(String operationId)Access to a route defined in the contract withoperationIdList<OpenAPIRoute>getRoutes()inthashCode()static RouterBuildernewInstance(RouterBuilder arg)RouterBuilderrootHandler(Handler<RoutingContext> rootHandler)Add global handler to be applied prior to being generated.Securitysecurity(String securitySchemeName)Creates a new security scheme for the required .StringtoString()
 
- 
- 
- 
Field Detail- 
__TYPE_ARGpublic static final io.vertx.lang.rx.TypeArg<RouterBuilder> __TYPE_ARG 
 - 
KEY_META_DATA_OPERATIONpublic static final String KEY_META_DATA_OPERATION - See Also:
- Constant Field Values
 
 - 
KEY_META_DATA_VALIDATED_REQUESTpublic static final String KEY_META_DATA_VALIDATED_REQUEST - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
RouterBuilderpublic RouterBuilder(RouterBuilder delegate) 
 - 
RouterBuilderpublic RouterBuilder(Object delegate) 
 
- 
 - 
Method Detail- 
getDelegatepublic RouterBuilder getDelegate() - Specified by:
- getDelegatein interface- io.vertx.lang.rx.RxDelegate
 
 - 
createpublic static RouterBuilder create(Vertx vertx, OpenAPIContract contract) Create a newRouterBuilder. Likecreate(io.vertx.reactivex.core.Vertx, io.vertx.reactivex.openapi.contract.OpenAPIContract)but uses a default implementation for the extractor.- Parameters:
- vertx- the related Vert.x instance
- contract- the contract that describes the endpoint
- Returns:
- an instance of RouterBuilder
 
 - 
createpublic static RouterBuilder create(Vertx vertx, OpenAPIContract contract, RequestExtractor extractor) Create a newRouterBuilder.- Parameters:
- vertx- the related Vert.x instance
- contract- the contract that describes the endpoint
- extractor- the extractor is used to extract and transform the parameters and body of the related request in a format that can be validated by the- RequestValidator.
- Returns:
- an instance of RouterBuilder
 
 - 
getRoutepublic OpenAPIRoute getRoute(String operationId) Access to a route defined in the contract withoperationId- Parameters:
- operationId- the id of the operation
- Returns:
- the requested route, or null if the passed operationId doesn't exist.
 
 - 
getRoutespublic List<OpenAPIRoute> getRoutes() - Returns:
- all routes defined in the contract
 
 - 
rootHandlerpublic RouterBuilder rootHandler(Handler<RoutingContext> rootHandler) Add global handler to be applied prior to being generated.- Parameters:
- rootHandler- the root handler to add
- Returns:
- self
 
 - 
securitypublic Security security(String securitySchemeName) Creates a new security scheme for the required .- Parameters:
- securitySchemeName-
- Returns:
- a security scheme.
 
 - 
createRouterpublic Router createRouter() Construct a new router based on the related OpenAPI contract.- Returns:
- a Router based on the related OpenAPI contract.
 
 - 
newInstancepublic static RouterBuilder newInstance(RouterBuilder arg) 
 
- 
 
-