interface Router
Interface created to guide the development of the Router.
Type Params | Return Type | Name and description |
---|---|---|
|
abstract void |
before(java.lang.String path, Handler handler) Creates an interceptor for a specific path. |
|
abstract void |
before(Handler handler) Creates an interceptor that intercepts all routes following this one. |
|
abstract void |
beforeRegex(java.lang.String path, Handler handler) Creates an interceptor using regex as a path pattern. |
|
abstract Route |
delete(java.lang.String path) Create a DELETE route. |
|
abstract Route |
delete(java.lang.String path, Handler handler) Create a DELETE route and set a handler. |
|
abstract Route |
get(java.lang.String path) Create a GET route. |
|
abstract Route |
get(java.lang.String path, Handler handler) Create a GET route and set a handler. |
|
abstract Route |
patch(java.lang.String path) Create a PATCH route. |
|
abstract Route |
patch(java.lang.String path, Handler handler) Create a PATCH route and set a handler. |
|
abstract void |
path(java.lang.String path, StaticHandlerOptions handlerOptions) Serve a directory using a static files handler. |
|
abstract void |
path(java.lang.String prefix, java.lang.Class<? extends java.util.function.Consumer<Router>> consumerClass) Mount a sub-router at a particular path. |
|
abstract void |
path(java.lang.String path, io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> handler) Mount a Vert.x Web handler to the routing stack at a specified path. |
|
abstract void |
pathRegex(java.lang.String regex, StaticHandlerOptions handlerOptions) Use a RegEx pattern to specify a path at which to mount the static files handler. |
|
abstract Route |
post(java.lang.String path) Create a POST route. |
|
abstract Route |
post(java.lang.String path, Handler handler) Create a POST route and set a handler. |
|
abstract Route |
put(java.lang.String path) Create a PUT route. |
|
abstract Route |
put(java.lang.String path, Handler handler) Create a PUT route and set a handler. |
|
abstract void |
use(io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> handler) Mount a Vert.x Web handler to the routing stack. |
Creates an interceptor for a specific path.
path
- The path to intercept. E.g. /private/*handler
- A handler.Creates an interceptor that intercepts all routes following this one.
handler
- A handler.Creates an interceptor using regex as a path pattern.
path
- The path pattern. E.g. ^/private-.*handler
- A handler.Create a DELETE route.
path
- The route path.Create a DELETE route and set a handler.
path
- The route path.handler
- A handler.Create a GET route.
path
- The route path.Create a GET route and set a handler.
path
- The route path.handler
- A handler.Create a PATCH route.
path
- The route path.Create a PATCH route and set a handler.
path
- The route path.handler
- A handler.Serve a directory using a static files handler.
path
- A path.handlerOptions
- Configuration for the static files handler.Mount a sub-router at a particular path.
prefix
- A path prefix such as /api/*consumerClass
- A Class that implements java.util.function.ConsumerMount a Vert.x Web handler to the routing stack at a specified path.
path
- The path/path prefixhandler
- A Vert.x Web handler like CORSHandlerUse a RegEx pattern to specify a path at which to mount the static files handler. Uses a String as the pattern to match the Vert.x router method signature.
regex
- A RegEx pattern.handler
- A handler.Create a POST route.
path
- The route path.Create a POST route and set a handler.
path
- The route path.handler
- A handler.Create a PUT route.
path
- The route path.Create a PUT route and set a handler.
path
- The route path.handler
- A handler.Mount a Vert.x Web handler to the routing stack.
handler
- A Vert.x Web handler like CORSHandler