Package io.vertx.mutiny.ext.web
Class Route
java.lang.Object
io.vertx.mutiny.ext.web.Route
- All Implemented Interfaces:
MutinyDelegate
A route is a holder for a set of criteria which determine whether an HTTP request or failure should be routed
to a handler.
NOTE: This class has been automatically generated from the
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblockingHandler
(io.vertx.core.Handler<RoutingContext> requestHandler, boolean ordered) blockingHandler
(Consumer<RoutingContext> requestHandler) disable()
enable()
boolean
failureHandler
(Consumer<RoutingContext> failureHandler) io.vertx.ext.web.Route
<T> T
getMetadata
(String key) getName()
getPath()
handler
(Consumer<RoutingContext> requestHandler) int
hashCode()
boolean
boolean
last()
metadata()
method
(io.vertx.core.http.HttpMethod method) Set<io.vertx.core.http.HttpMethod>
methods()
static Route
newInstance
(io.vertx.ext.web.Route arg) order
(int order) putMetadata
(String key, Object value) remove()
<T> Route
respond
(Function<RoutingContext, io.smallrye.mutiny.Uni<T>> function) setRegexGroupsNames
(List<String> groups) toString()
useNormalisedPath
(boolean useNormalizedPath) Deprecated.useNormalizedPath
(boolean useNormalizedPath) virtualHost
(String hostnamePattern)
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
Route
public Route(io.vertx.ext.web.Route delegate) -
Route
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.Route getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
method
- Parameters:
method
- the HTTP method to add- Returns:
- a reference to this, so the API can be used fluently
-
path
- Parameters:
path
- the path prefix- Returns:
- a reference to this, so the API can be used fluently
-
pathRegex
- Parameters:
path
- the path regex- Returns:
- a reference to this, so the API can be used fluently
-
produces
- Parameters:
contentType
- the content type- Returns:
- a reference to this, so the API can be used fluently
-
consumes
- Parameters:
contentType
- the content type- Returns:
- a reference to this, so the API can be used fluently
-
virtualHost
- Parameters:
hostnamePattern
- the hostname pattern that should matchHost
header of the requests- Returns:
- a reference to this, so the API can be used fluently
-
order
- Parameters:
order
- the order- Returns:
- a reference to this, so the API can be used fluently
-
last
- Returns:
- a reference to this, so the API can be used fluently
-
handler
- Parameters:
requestHandler
- the request handler- Returns:
-
blockingHandler
- Parameters:
requestHandler
-- Returns:
-
subRouter
- Parameters:
subRouter
- the router to add- Returns:
- a reference to this, so the API can be used fluently
-
blockingHandler
- Parameters:
requestHandler
- the blocking request handlerordered
- if true handlers are executed in sequence, otherwise are run in parallel- Returns:
- a reference to this, so the API can be used fluently
-
failureHandler
- Parameters:
failureHandler
- the request handler- Returns:
-
remove
- Returns:
- a reference to this, so the API can be used fluently
-
disable
- Returns:
- a reference to this, so the API can be used fluently
-
enable
- Returns:
- a reference to this, so the API can be used fluently
-
useNormalisedPath
Deprecated.- Parameters:
useNormalizedPath
-- Returns:
- the instance of Route to chain method calls.
-
useNormalizedPath
- Parameters:
useNormalizedPath
- use normalized path for routing?- Returns:
- a reference to this, so the API can be used fluently
-
getMetadata
- Parameters:
key
- the key for the metadata- Returns:
- the data
-
getPath
- Returns:
- the path prefix (if any) for this route
-
isRegexPath
public boolean isRegexPath()- Returns:
- true if backed by a pattern.
-
isExactPath
public boolean isExactPath()- Returns:
- true if the path is exact.
-
methods
- Returns:
- the http methods accepted by this route
-
setRegexGroupsNames
- Parameters:
groups
- group names- Returns:
- a reference to this, so the API can be used fluently
-
setName
- Parameters:
name
- The name of the route.- Returns:
- a reference to this, so the API can be used fluently
-
getName
- Returns:
- the name of the route. If not given explicitly, the path or the pattern or null is returned (in that order)
-
respond
- Parameters:
function
- the request handler function- Returns:
- a reference to this, so the API can be used fluently
-
putMetadata
- Parameters:
key
- the metadata of keyvalue
- the metadata of value- Returns:
- a reference to this, so the API can be used fluently
-
metadata
- Returns:
- the metadata of this route, never returns null.
-
newInstance
-