public class RouteSet extends Object
Router.path(String, Runnable)
.
Allow to globally apply attributes or metadata.Constructor and Description |
---|
RouteSet() |
Modifier and Type | Method and Description |
---|---|
RouteSet |
attribute(String name,
Object value)
Add one or more attributes applied to this route.
|
RouteSet |
consumes(MediaType... consumes)
Add one or more request types (format) consumed by this route.
|
RouteSet |
description(String description)
Route description useful for documentation purpose from openAPI generator.
|
String |
getDescription()
Route description useful for documentation purpose from openAPI generator.
|
List<Route> |
getRoutes()
Sub-routes.
|
String |
getSummary()
Route summary useful for documentation purpose from openAPI generator.
|
List<String> |
getTags()
Route tags.
|
RouteSet |
produces(MediaType... produces)
Add one or more response types (format) produces by this route.
|
RouteSet |
setAttributes(Map<String,Object> attributes)
Add one or more attributes applied to this route.
|
RouteSet |
setConsumes(Collection<MediaType> consumes)
Add one or more request types (format) consumed by this route.
|
RouteSet |
setDescription(String description)
Route description useful for documentation purpose from openAPI generator.
|
RouteSet |
setExecutorKey(String executorKey)
Set executor key.
|
RouteSet |
setProduces(Collection<MediaType> produces)
Add one or more response types (format) produces by this route.
|
RouteSet |
setRoutes(List<Route> routes)
Set sub-routes.
|
RouteSet |
setSummary(String summary)
Route summary useful for documentation purpose from openAPI generator.
|
RouteSet |
setTags(List<String> tags)
Tag this route.
|
RouteSet |
summary(String summary)
Route summary useful for documentation purpose from openAPI generator.
|
RouteSet |
tags(String... tags)
Tag this route.
|
@Nonnull public List<Route> getRoutes()
Router.path(String, Runnable)
or
Router.routes(Runnable)
.@Nonnull public RouteSet setRoutes(@Nonnull List<Route> routes)
routes
- Sub-routes.@Nonnull public RouteSet produces(@Nonnull MediaType... produces)
produces
- Produce types.@Nonnull public RouteSet setProduces(@Nonnull Collection<MediaType> produces)
produces
- Produce types.@Nonnull public RouteSet consumes(@Nonnull MediaType... consumes)
consumes
- Consume types.@Nonnull public RouteSet setConsumes(@Nonnull Collection<MediaType> consumes)
consumes
- Consume types.@Nonnull public RouteSet setAttributes(@Nonnull Map<String,Object> attributes)
attributes
- .@Nonnull public RouteSet attribute(@Nonnull String name, @Nonnull Object value)
name
- attribute namevalue
- attribute value@Nonnull public RouteSet setExecutorKey(@Nullable String executorKey)
null
: no specific executor, uses the default Jooby logic to choose one, based
on the value of ExecutionMode
;
- worker
: use the executor provided by the server.
- arbitrary name
: use an named executor which as registered using
Router.executor(String, Executor)
.executorKey
- Executor key.@Nonnull public RouteSet setTags(@Nonnull List<String> tags)
tags
- Tags.@Nonnull public RouteSet tags(@Nonnull String... tags)
tags
- Tags.@Nullable public String getSummary()
@Nonnull public RouteSet summary(@Nullable String summary)
summary
- Summary.@Nonnull public RouteSet setSummary(@Nullable String summary)
summary
- Summary.@Nullable public String getDescription()
@Nonnull public RouteSet setDescription(@Nullable String description)
description
- Description.Copyright © 2022. All rights reserved.