- All Superinterfaces:
io.helidon.common.Builder<HttpRouting.Builder,,HttpRouting> HttpRules,Supplier<HttpRouting>
- Enclosing class:
HttpRouting
public static interface HttpRouting.Builder
extends HttpRules, io.helidon.common.Builder<HttpRouting.Builder,HttpRouting>
Fluent API builder for
HttpRouting.-
Method Summary
Modifier and TypeMethodDescriptionaddFeature(Supplier<? extends HttpFeature> feature) Add a new feature.Add a new filter.default HttpRouting.BuilderAdd a route that executes on any HTTP method and any path.default HttpRouting.BuilderAdd a route that executes on any HTTP method and any path.default HttpRouting.BuilderAdd a delete route.default HttpRouting.BuilderAdd a delete route.<T extends Throwable>
HttpRouting.Buildererror(Class<T> exceptionClass, ErrorHandler<? super T> handler) Registers an error handler that handles the given type of exceptions.default HttpRouting.BuilderAdd a get route.default HttpRouting.BuilderAdd a get route.default HttpRouting.BuilderAdd a head route.default HttpRouting.BuilderAdd a head route.maxReRouteCount(int maxReRouteCount) Maximal number of allowed re-routes within routing.default HttpRouting.BuilderAdd an options route.default HttpRouting.BuilderAdd an options route.default HttpRouting.BuilderAdd an options route.default HttpRouting.BuilderAdd an options route.default HttpRouting.BuilderAdd a post route.default HttpRouting.BuilderAdd a post route.default HttpRouting.BuilderAdd a put route.default HttpRouting.BuilderAdd a put route.register(String path, Supplier<? extends HttpService>... service) Register a service on sub-path of the current path.register(Supplier<? extends HttpService>... service) Register a service on the current path.default HttpRouting.Builderroute(Http.Method method, PathMatcher pathMatcher, Handler handler) Add a route.default HttpRouting.Builderroute(Http.Method method, Handler handler) Add a route.default HttpRouting.Builderroute(Http.Method method, String pathPattern, Handler handler) Add a route.default HttpRouting.Builderroute(Http.Method method, String pathPattern, Consumer<ServerRequest> handler) Add a route.default HttpRouting.Builderroute(Http.Method method, String pathPattern, Function<ServerRequest, ?> handler) Add a route.default HttpRouting.Builderroute(Http.Method method, String pathPattern, Supplier<?> handler) Add a route.Add a route.default HttpRouting.Builderroute(Predicate<Http.Method> methodPredicate, PathMatcher pathMatcher, Handler handler) Add a route.default HttpRouting.BuilderAdd a route.security(HttpSecurity security) Configure security for this routing.default HttpRouting.BuilderAdd an options route.default HttpRouting.BuilderAdd an options route.Methods inherited from interface io.helidon.common.Builder
build, get, identity, update
-
Method Details
-
register
Description copied from interface:HttpRulesRegister a service on the current path. -
register
Description copied from interface:HttpRulesRegister a service on sub-path of the current path. -
route
Description copied from interface:HttpRulesAdd a route. This allows also protocol version specific routing. -
route
Description copied from interface:HttpRulesAdd a route. This allows also protocol version specific routing. -
route
Description copied from interface:HttpRulesAdd a route. -
route
Description copied from interface:HttpRulesAdd a route.- Specified by:
routein interfaceHttpRules- Parameters:
method- HTTP method to handlepathMatcher- URI path matcher, seePathMatchers.create(String)handler- handler to process HTTP request- Returns:
- updated rules
-
route
default HttpRouting.Builder route(Predicate<Http.Method> methodPredicate, PathMatcher pathMatcher, Handler handler) Description copied from interface:HttpRulesAdd a route.- Specified by:
routein interfaceHttpRules- Parameters:
methodPredicate- HTTP method predicate, seeHttp.Method.predicate(io.helidon.http.Http.Method...)pathMatcher- URI path matcher, seePathMatchers.create(String)handler- handler to process HTTP request- Returns:
- updated rules
-
route
Description copied from interface:HttpRulesAdd a route. -
get
Description copied from interface:HttpRulesAdd a get route. -
get
Description copied from interface:HttpRulesAdd a get route. -
post
Description copied from interface:HttpRulesAdd a post route. -
post
Description copied from interface:HttpRulesAdd a post route. -
put
Description copied from interface:HttpRulesAdd a put route. -
put
Description copied from interface:HttpRulesAdd a put route. -
delete
Description copied from interface:HttpRulesAdd a delete route. -
delete
Description copied from interface:HttpRulesAdd a delete route. -
head
Description copied from interface:HttpRulesAdd a head route. -
head
Description copied from interface:HttpRulesAdd a head route. -
options
Description copied from interface:HttpRulesAdd an options route. -
options
Description copied from interface:HttpRulesAdd an options route. -
trace
Description copied from interface:HttpRulesAdd an options route. -
trace
Description copied from interface:HttpRulesAdd an options route. -
patch
Description copied from interface:HttpRulesAdd an options route. -
patch
Description copied from interface:HttpRulesAdd an options route. -
any
Description copied from interface:HttpRulesAdd a route that executes on any HTTP method and any path. -
any
Description copied from interface:HttpRulesAdd a route that executes on any HTTP method and any path. -
route
default HttpRouting.Builder route(Http.Method method, String pathPattern, Consumer<ServerRequest> handler) Description copied from interface:HttpRulesAdd a route.- Specified by:
routein interfaceHttpRules- Parameters:
method- HTTP method to handlepathPattern- URI path patternhandler- handler as a consumer ofServerRequest- Returns:
- updated builder
-
route
default HttpRouting.Builder route(Http.Method method, String pathPattern, Function<ServerRequest, ?> handler) Description copied from interface:HttpRulesAdd a route.- Specified by:
routein interfaceHttpRules- Parameters:
method- HTTP method to handlepathPattern- URI path patternhandler- handler as a function that getsServerRequestand returns an entity- Returns:
- updated builder
-
route
Description copied from interface:HttpRulesAdd a route. -
addFilter
Add a new filter.- Parameters:
filter- filter to add- Returns:
- updated builder
-
addFeature
Add a new feature. If a feature is added from within a feature, it will inherit weight of the feature adding it and will be fully registered at the same time.- Parameters:
feature- feature to add- Returns:
- updated builder
-
error
<T extends Throwable> HttpRouting.Builder error(Class<T> exceptionClass, ErrorHandler<? super T> handler) Registers an error handler that handles the given type of exceptions. This will replace an existing error handler for the same exception class.- Type Parameters:
T- exception type- Parameters:
exceptionClass- the type of exception to handle by this handlerhandler- the error handler- Returns:
- updated builder
-
maxReRouteCount
Maximal number of allowed re-routes within routing.- Parameters:
maxReRouteCount- maximum number of allowed reroutes- Returns:
- updated builder
- See Also:
-
security
Configure security for this routing.- Parameters:
security- security to use- Returns:
- updated builder
-