Package io.helidon.webserver
Interface Routing.Rules
- 
- All Known Implementing Classes:
- Routing.Builder
 - Enclosing interface:
- Routing
 
 public static interface Routing.RulesAn API to define HTTP request routing rules.- See Also:
- Routing.Builder
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Routing.Rulesany(Handler... requestHandlers)Routes all requests to provided handler(s).Routing.Rulesany(PathMatcher pathMatcher, Handler... requestHandlers)Routes all requests with corresponding path to provided handler(s).Routing.Rulesany(String pathPattern, Handler... requestHandlers)Routes all requests with corresponding path to provided handler(s).Routing.RulesanyOf(Iterable<Http.RequestMethod> methods, Handler... requestHandlers)Routes requests any specified method to provided handler(s).Routing.RulesanyOf(Iterable<Http.RequestMethod> methods, PathMatcher pathMatcher, Handler... requestHandlers)Routes requests with any specified method and corresponding path to provided handler(s).Routing.RulesanyOf(Iterable<Http.RequestMethod> methods, String pathPattern, Handler... requestHandlers)Routes requests with any specified method and corresponding path to provided handler(s).Routing.Rulesdelete(Handler... requestHandlers)Routes all DELETE requests to provided handler(s).Routing.Rulesdelete(PathMatcher pathMatcher, Handler... requestHandlers)Routes DELETE requests with corresponding path to provided handler(s).Routing.Rulesdelete(String pathPattern, Handler... requestHandlers)Routes DELETE requests with corresponding path to provided handler(s).Routing.Rulesget(Handler... requestHandlers)Routes all GET requests to provided handler(s).Routing.Rulesget(PathMatcher pathMatcher, Handler... requestHandlers)Routes GET requests with corresponding path to provided handler(s).Routing.Rulesget(String pathPattern, Handler... requestHandlers)Routes GET requests with corresponding path to provided handler(s).Routing.Ruleshead(Handler... requestHandlers)Routes all HEAD requests to provided handler(s).Routing.Ruleshead(PathMatcher pathMatcher, Handler... requestHandlers)Routes HEAD requests with corresponding path to provided handler(s).Routing.Ruleshead(String pathPattern, Handler... requestHandlers)Routes HEAD requests with corresponding path to provided handler(s).Routing.RulesonNewWebServer(Consumer<WebServer> webServerConsumer)Registers callback on created newWebServerinstance with this routing.Routing.Rulesoptions(Handler... requestHandlers)Routes all OPTIONS requests to provided handler(s).Routing.Rulesoptions(PathMatcher pathMatcher, Handler... requestHandlers)Routes OPTIONS requests with corresponding path to provided handler(s).Routing.Rulesoptions(String pathPattern, Handler... requestHandlers)Routes OPTIONS requests with corresponding path to provided handler(s).Routing.Rulespost(Handler... requestHandlers)Routes all POST requests to provided handler(s).Routing.Rulespost(PathMatcher pathMatcher, Handler... requestHandlers)Routes POST requests with corresponding path to provided handler(s).Routing.Rulespost(String pathPattern, Handler... requestHandlers)Routes POST requests with corresponding path to provided handler(s).Routing.Rulesput(Handler... requestHandlers)Routes all PUT requests to provided handler(s).Routing.Rulesput(PathMatcher pathMatcher, Handler... requestHandlers)Routes PUT requests with corresponding path to provided handler(s).Routing.Rulesput(String pathPattern, Handler... requestHandlers)Routes PUT requests with corresponding path to provided handler(s).Routing.Rulesregister(Service... services)Registers builder consumer.Routing.Rulesregister(WebTracingConfig webTracingConfig)Configuration of tracing for this routing.Routing.Rulesregister(String pathPattern, Service... services)Registers builder consumer.Routing.Rulesregister(String pathPattern, Supplier<? extends Service>... serviceBuilders)Registers builder consumer.Routing.Rulesregister(Supplier<? extends Service>... serviceBuilders)Registers builder consumer.Routing.Rulestrace(Handler... requestHandlers)Routes all TRACE requests to provided handler(s).Routing.Rulestrace(PathMatcher pathMatcher, Handler... requestHandlers)Routes TRACE requests with corresponding path to provided handler(s).Routing.Rulestrace(String pathPattern, Handler... requestHandlers)Routes TRACE requests with corresponding path to provided handler(s).
 
- 
- 
- 
Method Detail- 
registerRouting.Rules register(WebTracingConfig webTracingConfig) Configuration of tracing for this routing. The configuration may control whether to log specific components, spans and span logs, either globally, or for a specific path and method combinations.- Parameters:
- webTracingConfig- WebServer tracing configuration
- Returns:
- Updated routing configuration
 
 - 
registerRouting.Rules register(Service... services) Registers builder consumer. It enables to separate complex routing definitions to dedicated classes.- Parameters:
- services- services to register
- Returns:
- Updated routing configuration
 
 - 
registerRouting.Rules register(Supplier<? extends Service>... serviceBuilders) Registers builder consumer. It enables to separate complex routing definitions to dedicated classes.- Parameters:
- serviceBuilders- service builder to register; they will be built as a first step of this method execution
- Returns:
- Updated routing configuration
 
 - 
registerRouting.Rules register(String pathPattern, Service... services) Registers builder consumer. It enables to separate complex routing definitions to dedicated classes.- Parameters:
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- services- services to register
- Returns:
- Updated routing configuration
 
 - 
registerRouting.Rules register(String pathPattern, Supplier<? extends Service>... serviceBuilders) Registers builder consumer. It enables to separate complex routing definitions to dedicated classes.- Parameters:
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- serviceBuilders- service builder to register; they will be built as a first step of this method execution
- Returns:
- an updated routing configuration
 
 - 
getRouting.Rules get(Handler... requestHandlers) Routes all GET requests to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
getRouting.Rules get(String pathPattern, Handler... requestHandlers) Routes GET requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
getRouting.Rules get(PathMatcher pathMatcher, Handler... requestHandlers) Routes GET requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathMatcher- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
putRouting.Rules put(Handler... requestHandlers) Routes all PUT requests to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
putRouting.Rules put(String pathPattern, Handler... requestHandlers) Routes PUT requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
putRouting.Rules put(PathMatcher pathMatcher, Handler... requestHandlers) Routes PUT requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathMatcher- define path for a registered router
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
postRouting.Rules post(Handler... requestHandlers) Routes all POST requests to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
postRouting.Rules post(String pathPattern, Handler... requestHandlers) Routes POST requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
postRouting.Rules post(PathMatcher pathMatcher, Handler... requestHandlers) Routes POST requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathMatcher- define path for registered router
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
deleteRouting.Rules delete(Handler... requestHandlers) Routes all DELETE requests to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
deleteRouting.Rules delete(String pathPattern, Handler... requestHandlers) Routes DELETE requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
deleteRouting.Rules delete(PathMatcher pathMatcher, Handler... requestHandlers) Routes DELETE requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathMatcher- define path for registered router
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
optionsRouting.Rules options(Handler... requestHandlers) Routes all OPTIONS requests to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
optionsRouting.Rules options(String pathPattern, Handler... requestHandlers) Routes OPTIONS requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
optionsRouting.Rules options(PathMatcher pathMatcher, Handler... requestHandlers) Routes OPTIONS requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathMatcher- define path for registered router
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
headRouting.Rules head(Handler... requestHandlers) Routes all HEAD requests to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
headRouting.Rules head(String pathPattern, Handler... requestHandlers) Routes HEAD requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
headRouting.Rules head(PathMatcher pathMatcher, Handler... requestHandlers) Routes HEAD requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathMatcher- define path for registered router
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
traceRouting.Rules trace(Handler... requestHandlers) Routes all TRACE requests to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
traceRouting.Rules trace(String pathPattern, Handler... requestHandlers) Routes TRACE requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
traceRouting.Rules trace(PathMatcher pathMatcher, Handler... requestHandlers) Routes TRACE requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathMatcher- define path for registered router
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
anyRouting.Rules any(Handler... requestHandlers) Routes all requests to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
anyRouting.Rules any(String pathPattern, Handler... requestHandlers) Routes all requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
anyRouting.Rules any(PathMatcher pathMatcher, Handler... requestHandlers) Routes all requests with corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- pathMatcher- define path for registered router
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
anyOfRouting.Rules anyOf(Iterable<Http.RequestMethod> methods, Handler... requestHandlers) Routes requests any specified method to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- methods- HTTP methods
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
anyOfRouting.Rules anyOf(Iterable<Http.RequestMethod> methods, String pathPattern, Handler... requestHandlers) Routes requests with any specified method and corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- methods- HTTP methods
- pathPattern- a URI path pattern. See- PathMatcherfor pattern syntax reference.
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
anyOfRouting.Rules anyOf(Iterable<Http.RequestMethod> methods, PathMatcher pathMatcher, Handler... requestHandlers) Routes requests with any specified method and corresponding path to provided handler(s). Request handler can callServerRequest.next()to continue processing on the next registered handler.- Parameters:
- methods- HTTP methods
- pathMatcher- define path for registered router
- requestHandlers- handlers to tryProcess HTTP request
- Returns:
- an updated routing configuration
 
 - 
onNewWebServerRouting.Rules onNewWebServer(Consumer<WebServer> webServerConsumer) Registers callback on created newWebServerinstance with this routing.- Parameters:
- webServerConsumer- a WebServer creation callback
- Returns:
- updated routing configuration
 
 
- 
 
-