public interface Router
Core Router interface that allows discovery of a route given an HTTP method and URI.
| Modifier and Type | Method and Description | 
|---|---|
default <T,R> Optional<UriRouteMatch<T,R>> | 
DELETE(CharSequence uri)
Find the first  
RouteMatch route for an HttpMethod.DELETE method and the given URI. | 
<T,R> Stream<UriRouteMatch<T,R>> | 
find(HttpMethod httpMethod,
    CharSequence uri)
Finds all of the possible routes for the given HTTP method and URI. 
 | 
default <T,R> Stream<UriRouteMatch<T,R>> | 
find(HttpMethod httpMethod,
    URI uri)
Finds all of the possible routes for the given HTTP method and URI. 
 | 
<T,R> Stream<UriRouteMatch<T,R>> | 
findAny(CharSequence uri)
Find any  
RouteMatch regardless of HTTP method. | 
List<HttpFilter> | 
findFilters(HttpRequest<?> request)
Build a filtered  
Publisher for an action. | 
default <T,R> Optional<UriRouteMatch<T,R>> | 
GET(CharSequence uri)
Find the first  
RouteMatch route for an HttpMethod.GET method and the given URI. | 
default <T,R> Optional<UriRouteMatch<T,R>> | 
HEAD(CharSequence uri)
Find the first  
RouteMatch route for an HttpMethod.HEAD method and the given URI. | 
default <T,R> Optional<UriRouteMatch<T,R>> | 
OPTIONS(CharSequence uri)
Find the first  
RouteMatch route for an HttpMethod.OPTIONS method and the given URI. | 
default <T,R> Optional<UriRouteMatch<T,R>> | 
PATCH(CharSequence uri)
Find the first  
RouteMatch route for an HttpMethod.PATCH method and the given URI. | 
default <T,R> Optional<UriRouteMatch<T,R>> | 
POST(CharSequence uri)
Find the first  
RouteMatch route for an HttpMethod.POST method and the given URI. | 
default <T,R> Optional<UriRouteMatch<T,R>> | 
PUT(CharSequence uri)
Find the first  
RouteMatch route for an HttpMethod.PUT method and the given URI. | 
<R> Optional<RouteMatch<R>> | 
route(Class originatingClass,
     HttpStatus status)
Found a  
RouteMatch for the given HttpStatus code. | 
<R> Optional<RouteMatch<R>> | 
route(Class originatingClass,
     Throwable error)
Match a route to an error. 
 | 
<T,R> Optional<UriRouteMatch<T,R>> | 
route(HttpMethod httpMethod,
     CharSequence uri)
Finds the first possible route for the given HTTP method and URI. 
 | 
<R> Optional<RouteMatch<R>> | 
route(HttpStatus status)
Found a  
RouteMatch for the given HttpStatus code. | 
<R> Optional<RouteMatch<R>> | 
route(Throwable error)
Match a route to an error. 
 | 
Stream<UriRoute> | 
uriRoutes()
Returns all UriRoutes. 
 | 
<T,R> Stream<UriRouteMatch<T,R>> findAny(CharSequence uri)
RouteMatch regardless of HTTP method.T - The target typeR - The return typeuri - The URI<T,R> Stream<UriRouteMatch<T,R>> find(HttpMethod httpMethod, CharSequence uri)
<T,R> Optional<UriRouteMatch<T,R>> route(HttpMethod httpMethod, CharSequence uri)
T - The target typeR - The URI route matchhttpMethod - The HTTP methoduri - The URI<R> Optional<RouteMatch<R>> route(HttpStatus status)
RouteMatch for the given HttpStatus code.R - The matched routestatus - The HTTP statusRouteMatch<R> Optional<RouteMatch<R>> route(Class originatingClass, HttpStatus status)
RouteMatch for the given HttpStatus code.R - The matched routeoriginatingClass - The class the error originates fromstatus - The HTTP statusRouteMatch<R> Optional<RouteMatch<R>> route(Throwable error)
R - The matched routeerror - The errorRouteMatch<R> Optional<RouteMatch<R>> route(Class originatingClass, Throwable error)
R - The matched routeoriginatingClass - The class the error originates fromerror - The errorRouteMatchList<HttpFilter> findFilters(HttpRequest<?> request)
Publisher for an action.request - The requestdefault <T,R> Optional<UriRouteMatch<T,R>> GET(CharSequence uri)
RouteMatch route for an HttpMethod.GET method and the given URI.T - The target typeR - The return typeuri - The URIOptional of RouteMatchdefault <T,R> Optional<UriRouteMatch<T,R>> POST(CharSequence uri)
RouteMatch route for an HttpMethod.POST method and the given URI.T - The target typeR - The return typeuri - The URIOptional of RouteMatchdefault <T,R> Optional<UriRouteMatch<T,R>> PUT(CharSequence uri)
RouteMatch route for an HttpMethod.PUT method and the given URI.T - The target typeR - The URI route matchuri - The URIOptional of RouteMatchdefault <T,R> Optional<UriRouteMatch<T,R>> PATCH(CharSequence uri)
RouteMatch route for an HttpMethod.PATCH method and the given URI.T - The target typeR - The return typeuri - The URIOptional of RouteMatchdefault <T,R> Optional<UriRouteMatch<T,R>> DELETE(CharSequence uri)
RouteMatch route for an HttpMethod.DELETE method and the given URI.T - The target typeR - The return typeuri - The URIOptional of RouteMatchdefault <T,R> Optional<UriRouteMatch<T,R>> OPTIONS(CharSequence uri)
RouteMatch route for an HttpMethod.OPTIONS method and the given URI.T - The target typeR - The return typeuri - The URIOptional of RouteMatchdefault <T,R> Optional<UriRouteMatch<T,R>> HEAD(CharSequence uri)
RouteMatch route for an HttpMethod.HEAD method and the given URI.T - The target typeR - The return typeuri - The URIOptional of RouteMatchdefault <T,R> Stream<UriRouteMatch<T,R>> find(HttpMethod httpMethod, URI uri)