- All Known Subinterfaces:
HttpRouting.Builder
public interface HttpRules
HTTP Routing rules, used by both
HttpRouting.Builder
and by HttpService.routing(HttpRules)
.-
Method Summary
Modifier and TypeMethodDescriptiondefault HttpRules
Add a route that executes on any HTTP method and any path.default HttpRules
Add a route that executes on any HTTP method and any path.default HttpRules
Add a delete route.default HttpRules
Add a delete route.default HttpRules
Add a get route.default HttpRules
Add a get route.default HttpRules
Add a head route.default HttpRules
Add a head route.default HttpRules
Add an options route.default HttpRules
Add an options route.default HttpRules
Add an options route.default HttpRules
Add an options route.default HttpRules
Add a post route.default HttpRules
Add a post route.default HttpRules
Add a put route.default HttpRules
Add a put route.register
(HttpService... service) Register a service on the current path.register
(String pathPattern, HttpService... service) Register a service on sub-path of the current path.default HttpRules
register
(String pathPattern, Supplier<? extends HttpService> service) Register a service on sub-path of the current path.default HttpRules
register
(String pathPattern, Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2) Register two services on sub-path of the current path.default HttpRules
register
(String pathPattern, Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3) Register three services on sub-path of the current path.default HttpRules
register
(String pathPattern, Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3, Supplier<? extends HttpService> service4) Register four services on sub-path of the current path.default HttpRules
register
(String pathPattern, Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3, Supplier<? extends HttpService> service4, Supplier<? extends HttpService> service5) Register five services on sub-path of the current path.default HttpRules
register
(String pathPattern, List<Supplier<? extends HttpService>> services) Register services on sub-path of the current path.default HttpRules
register
(Supplier<? extends HttpService> service) Register a service on the current path.default HttpRules
register
(Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2) Register two services on the current path.default HttpRules
register
(Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3) Register three services on the current path.default HttpRules
register
(Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3, Supplier<? extends HttpService> service4) Register four services on the current path.default HttpRules
register
(Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3, Supplier<? extends HttpService> service4, Supplier<? extends HttpService> service5) Register five services on the current path.default HttpRules
register
(List<Supplier<? extends HttpService>> services) Register services on the current path.default HttpRules
route
(Method method, PathMatcher pathMatcher, Handler handler) Add a route.default HttpRules
Add a route.default HttpRules
Add a route.default HttpRules
route
(Method method, String pathPattern, Consumer<ServerRequest> handler) Add a route.default HttpRules
route
(Method method, String pathPattern, Function<ServerRequest, ?> handler) Add a route.default HttpRules
Add a route.Add a route.default HttpRules
route
(Predicate<Method> methodPredicate, PathMatcher pathMatcher, Handler handler) Add a route.default HttpRules
Add a route.default HttpRules
Add an options route.default HttpRules
Add an options route.
-
Method Details
-
register
Register a service on the current path.- Parameters:
service
- service to register- Returns:
- updated rules
-
register
Register a service on the current path.- Parameters:
service
- service to register- Returns:
- updated rules
-
register
default HttpRules register(Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2) Register two services on the current path.- Parameters:
service1
- first service to registerservice2
- second service to register- Returns:
- updated rules
-
register
default HttpRules register(Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3) Register three services on the current path.- Parameters:
service1
- first service to registerservice2
- second service to registerservice3
- third service to register- Returns:
- updated rules
-
register
default HttpRules register(Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3, Supplier<? extends HttpService> service4) Register four services on the current path.- Parameters:
service1
- first service to registerservice2
- second service to registerservice3
- third service to registerservice4
- fourth service to register- Returns:
- updated rules
-
register
default HttpRules register(Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3, Supplier<? extends HttpService> service4, Supplier<? extends HttpService> service5) Register five services on the current path.- Parameters:
service1
- first service to registerservice2
- second service to registerservice3
- third service to registerservice4
- fourth service to registerservice5
- fifth service to register- Returns:
- updated rules
-
register
Register services on the current path.- Parameters:
services
- services to register- Returns:
- updated rules
-
register
Register a service on sub-path of the current path.- Parameters:
pathPattern
- URI path patternservice
- service to register- Returns:
- updated rules
-
register
Register a service on sub-path of the current path.- Parameters:
pathPattern
- URI path patternservice
- service to register- Returns:
- updated rules
-
register
default HttpRules register(String pathPattern, Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2) Register two services on sub-path of the current path.- Parameters:
pathPattern
- URI path patternservice1
- first service to registerservice2
- second service to register- Returns:
- updated rules
-
register
default HttpRules register(String pathPattern, Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3) Register three services on sub-path of the current path.- Parameters:
pathPattern
- URI path patternservice1
- first service to registerservice2
- second service to registerservice3
- third service to register- Returns:
- updated rules
-
register
default HttpRules register(String pathPattern, Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3, Supplier<? extends HttpService> service4) Register four services on sub-path of the current path.- Parameters:
pathPattern
- URI path patternservice1
- first service to registerservice2
- second service to registerservice3
- third service to registerservice4
- fourth service to register- Returns:
- updated rules
-
register
default HttpRules register(String pathPattern, Supplier<? extends HttpService> service1, Supplier<? extends HttpService> service2, Supplier<? extends HttpService> service3, Supplier<? extends HttpService> service4, Supplier<? extends HttpService> service5) Register five services on sub-path of the current path.- Parameters:
pathPattern
- URI path patternservice1
- first service to registerservice2
- second service to registerservice3
- third service to registerservice4
- fourth service to registerservice5
- fifth service to register- Returns:
- updated rules
-
register
Register services on sub-path of the current path.- Parameters:
pathPattern
- URI path patternservices
- services to register- Returns:
- updated rules
-
route
Add a route. This allows also protocol version specific routing.- Parameters:
route
- route to add- Returns:
- updated rules
-
route
Add a route. This allows also protocol version specific routing.- Parameters:
route
- route to add- Returns:
- updated rules
-
route
Add a route.- Parameters:
method
- HTTP method to handlepathPattern
- URI path patternhandler
- handler to process HTTP request- Returns:
- updated rules
-
route
Add a route.- Parameters:
method
- HTTP method to handlepathMatcher
- URI path matcher, seePathMatchers.create(String)
handler
- handler to process HTTP request- Returns:
- updated rules
-
route
default HttpRules route(Predicate<Method> methodPredicate, PathMatcher pathMatcher, Handler handler) Add a route.- Parameters:
methodPredicate
- HTTP method predicate, seeMethod.predicate(io.helidon.http.Method...)
pathMatcher
- URI path matcher, seePathMatchers.create(String)
handler
- handler to process HTTP request- Returns:
- updated rules
-
route
Add a route.- Parameters:
method
- HTTP method to handlehandler
- handler to process HTTP request- Returns:
- updated rules
-
get
Add a get route.- Parameters:
pathPattern
- URI path patternhandlers
- handlers to process HTTP request- Returns:
- updated rules
-
get
Add a get route.- Parameters:
handlers
- handlers to process HTTP request- Returns:
- updated rules
-
post
Add a post route.- Parameters:
pathPattern
- URI path patternhandlers
- handlers to process HTTP request- Returns:
- updated rules
-
post
Add a post route.- Parameters:
handlers
- handlers to process HTTP request- Returns:
- updated rules
-
put
Add a put route.- Parameters:
pathPattern
- URI path patternhandlers
- handlers to process HTTP request- Returns:
- updated rules
-
put
Add a put route.- Parameters:
handlers
- handlers to process HTTP request- Returns:
- updated rules
-
delete
Add a delete route.- Parameters:
pathPattern
- URI path patternhandlers
- handlers to process HTTP request- Returns:
- updated rules
-
delete
Add a delete route.- Parameters:
handlers
- handlers to process HTTP request- Returns:
- updated rules
-
head
Add a head route.- Parameters:
pathPattern
- URI path patternhandlers
- handlers to process HTTP request- Returns:
- updated rules
-
head
Add a head route.- Parameters:
handlers
- handlers to process HTTP request- Returns:
- updated rules
-
options
Add an options route.- Parameters:
pathPattern
- URI path patternhandlers
- handlers to process HTTP request- Returns:
- updated rules
-
options
Add an options route.- Parameters:
handlers
- handlers to process HTTP request- Returns:
- updated rules
-
trace
Add an options route.- Parameters:
pathPattern
- URI path patternhandlers
- handlers to process HTTP request- Returns:
- updated rules
-
trace
Add an options route.- Parameters:
handlers
- handlers to process HTTP request- Returns:
- updated rules
-
patch
Add an options route.- Parameters:
pathPattern
- URI path patternhandlers
- handlers to process HTTP request- Returns:
- updated rules
-
patch
Add an options route.- Parameters:
handlers
- handlers to process HTTP request- Returns:
- updated rules
-
any
Add a route that executes on any HTTP method and any path.- Parameters:
pathPattern
- URI path patternhandlers
- handlers to process HTTP request- Returns:
- updated rules
-
any
Add a route that executes on any HTTP method and any path.- Parameters:
handlers
- handlers to process HTTP request- Returns:
- updated rules
-
route
Add a route.- Parameters:
method
- HTTP method to handlepathPattern
- URI path patternhandler
- handler as a consumer ofServerRequest
- Returns:
- updated builder
-
route
Add a route.- Parameters:
method
- HTTP method to handlepathPattern
- URI path patternhandler
- handler as a function that getsServerRequest
and returns an entity- Returns:
- updated builder
-
route
Add a route.- Parameters:
method
- HTTP method to handlepathPattern
- URI path patternhandler
- supplier of entity- Returns:
- updated builder
-