java.lang.Object
io.jooby.RouteSet
Give you access to all routes created inside a
Router.path(String, Runnable)
. Allow to
globally apply attributes or metadata.- Since:
- 2.7.3
- Author:
- edgar
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd one or more attributes applied to this route.Add one or more request types (format) consumed by this route.description
(String description) Route description useful for documentation purpose from openAPI generator.Route description useful for documentation purpose from openAPI generator.Sub-routes.Route summary useful for documentation purpose from openAPI generator.getTags()
Route tags.Add one or more response types (format) produces by this route.setAttributes
(Map<String, Object> attributes) Add one or more attributes applied to this route.setConsumes
(Collection<MediaType> consumes) Add one or more request types (format) consumed by this route.setDescription
(String description) Route description useful for documentation purpose from openAPI generator.setExecutorKey
(String executorKey) Set executor key.setProduces
(Collection<MediaType> produces) Add one or more response types (format) produces by this route.Set sub-routes.setSummary
(String summary) Route summary useful for documentation purpose from openAPI generator.Tag this route.Route summary useful for documentation purpose from openAPI generator.Tag this route.
-
Constructor Details
-
RouteSet
public RouteSet()
-
-
Method Details
-
getRoutes
Sub-routes. Always empty except when used it fromRouter.path(String, Runnable)
orRouter.routes(Runnable)
.- Returns:
- Sub-routes.
-
setRoutes
Set sub-routes.- Parameters:
routes
- Sub-routes.- Returns:
- This route.
-
produces
Add one or more response types (format) produces by this route.- Parameters:
produces
- Produce types.- Returns:
- This route.
-
setProduces
Add one or more response types (format) produces by this route.- Parameters:
produces
- Produce types.- Returns:
- This route.
-
consumes
Add one or more request types (format) consumed by this route.- Parameters:
consumes
- Consume types.- Returns:
- This route.
-
setConsumes
Add one or more request types (format) consumed by this route.- Parameters:
consumes
- Consume types.- Returns:
- This route.
-
setAttributes
Add one or more attributes applied to this route.- Parameters:
attributes
- .- Returns:
- This route.
-
attribute
Add one or more attributes applied to this route.- Parameters:
name
- attribute namevalue
- attribute value- Returns:
- This route.
-
setExecutorKey
Set executor key. The route is going to use the given key to fetch an executor. Possible values are:-
null
: no specific executor, uses the default Jooby logic to choose one, based on the value ofExecutionMode
; -worker
: use the executor provided by the server. -arbitrary name
: use an named executor which as registered usingRouter.executor(String, Executor)
.- Parameters:
executorKey
- Executor key.- Returns:
- This route.
-
getTags
Route tags.- Returns:
- Route tags.
-
setTags
Tag this route. Tags are used for documentation purpose from openAPI generator.- Parameters:
tags
- Tags.- Returns:
- This route.
-
tags
Tag this route. Tags are used for documentation purpose from openAPI generator.- Parameters:
tags
- Tags.- Returns:
- This route.
-
getSummary
Route summary useful for documentation purpose from openAPI generator.- Returns:
- Summary.
-
summary
Route summary useful for documentation purpose from openAPI generator.- Parameters:
summary
- Summary.- Returns:
- This route.
-
setSummary
Route summary useful for documentation purpose from openAPI generator.- Parameters:
summary
- Summary.- Returns:
- This route.
-
getDescription
Route description useful for documentation purpose from openAPI generator.- Returns:
- Route description.
-
setDescription
Route description useful for documentation purpose from openAPI generator.- Parameters:
description
- Description.- Returns:
- This route.
-
description
Route description useful for documentation purpose from openAPI generator.- Parameters:
description
- Description.- Returns:
- This route.
-