Class RouteBuildItem
Producing this build item does not mean the HTTP server is available. It will be consumed if the Quarkus Vert.x HTTP extension is present.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder to configure the route.static enumThe type of route handlerstatic enumType of routes. -
Constructor Summary
ConstructorsConstructorDescriptionRouteBuildItem(RouteBuildItem.RouteType typeOfRoute, String path, Consumer<io.vertx.ext.web.Route> customizer, boolean isManagement, io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> handler, boolean displayOnNotFoundPage, String notFoundPageTitle, String routeConfigKey, OptionalInt order) -
Method Summary
Modifier and TypeMethodDescriptionConsumer<io.vertx.ext.web.Route>io.vertx.core.Handler<io.vertx.ext.web.RoutingContext>intgetOrder()getPath()booleanhasOrder()booleanbooleanbooleanstatic RouteBuildItem.BuildernewAbsoluteRoute(String path) Declares a new absolute route.static RouteBuildItem.BuildernewApplicationRoute(String path) Declares a new application route.static RouteBuildItem.BuildernewFrameworkRoute(String path) Declares a new framework route.static RouteBuildItem.BuildernewManagementRoute(String path) Declares a new management route.static RouteBuildItem.BuildernewManagementRoute(String path, String managementConfigKey) Declares a new framework route, conditionally considered as a management route depending on the value of themanagementConfigKeyproperty.
-
Constructor Details
-
RouteBuildItem
public RouteBuildItem(RouteBuildItem.RouteType typeOfRoute, String path, Consumer<io.vertx.ext.web.Route> customizer, boolean isManagement, io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> handler, boolean displayOnNotFoundPage, String notFoundPageTitle, String routeConfigKey, OptionalInt order)
-
-
Method Details
-
getTypeOfRoute
-
hasOrder
public boolean hasOrder() -
getOrder
public int getOrder() -
hasRouteConfigKey
public boolean hasRouteConfigKey() -
getRouteConfigKey
-
getHandler
public io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> getHandler() -
getHandlerType
-
getPath
-
getCustomizer
-
getNotFoundPageTitle
-
isDisplayOnNotFoundPage
public boolean isDisplayOnNotFoundPage() -
newApplicationRoute
Declares a new application route. Application routes are part of the application business logic and are mounted on the application router. Thequarkus.http.root-pathproperty is applied in front of the route path (if set).- Parameters:
path- the path, must not benullor empty- Returns:
- the builder to configure the route
-
newAbsoluteRoute
Declares a new absolute route. Application routes are part of the application business logic and are mounted at the root of the server. Thequarkus.http.root-pathproperty is not applied.- Parameters:
path- the path, must not benullor empty, and must start with a slash- Returns:
- the builder to configure the route
-
newFrameworkRoute
Declares a new framework route. A framework route is provided by the Quarkus framework (or extensions).The
quarkus.http.non-application-root-pathproperty is applied in front of the route path (defaults to/q).The declared route is not considered as a management route, meaning it will be mounted on the application router and exposed on the main HTTP server. See
newManagementRoute(String)to declare a management route.- Parameters:
path- the path, must not benullor empty.- Returns:
- the builder to configure the route
-
newManagementRoute
Declares a new management route.A management route is provided by the Quarkus framework (or extensions), and unlike routes declared with
newFrameworkRoute(String), are mounted on the management router (exposed on the management HTTP server) when the management interface is enabled (see the management interface documentation for further details).If the management interface is not enabled, the
quarkus.http.non-application-root-pathproperty is applied in front of the route path (defaults to/q). If the management interface is enabled, thequarkus.management.root-pathproperty is applied in front of the route path (also defaults to/qbut exposed on another port, 9000 by default).- Parameters:
path- the path, must not benullor empty.- Returns:
- the builder to configure the route
-
newManagementRoute
Declares a new framework route, conditionally considered as a management route depending on the value of themanagementConfigKeyproperty.The route is provided by the Quarkus framework (or extensions). Depending on the value associated to the
managementConfigKeyproperty, the route is either mounted to the application router (exposed on the main HTTP server) or on the management router (exposed on the management HTTP server). The property must be a boolean (set totrueto expose the route on the management server orfalseto expose it on the main HTTP server).If the management interface is not enabled, regardless the value of the property, the route is exposed on the main HTTP server. The
quarkus.http.non-application-root-pathproperty is applied in front of the route path (defaults to/q).If the management interface is enabled and if the property is set to
true, the route is exposed on the management server and thequarkus.management.root-pathproperty is applied in front of the route path (also defaults to/qbut exposed on another port, 9000 by default).If the management interface is enabled and if the property is set to
false, the route is exposed on the main HTTP server. Thequarkus.http.non-application-root-pathproperty is applied in front of the route path (defaults to/q).- Parameters:
path- the path, must not benullor empty.- Returns:
- the builder to configure the route
-
isManagement
public boolean isManagement()
-