public static interface RouteGroup.RouteMounter
Modifier and Type | Method and Description |
---|---|
default RouteGroup.RouteMounter |
cache(long time,
java.util.concurrent.TimeUnit timeUnit)
Enables caching.
|
RouteGroup.RouteMounter |
cache(long time,
java.util.concurrent.TimeUnit timeUnit,
RouteGroup.CacheKeyGen keyGen)
Enables caching.
|
RouteGroup.RouteMounter |
concurrency(int concurrencyLimit,
int waitTime)
Sets the maximum number of concurrent instances of this route that may be handled at one time.
|
RouteGroup.RouteMounter |
handler(RouteHandler handler)
The handler that fetches the information from this route.
|
RouteGroup.RouteMounter |
method(HttpMethod method)
The HTTP method that triggers this route.
|
void |
mount()
Call this at the end to mount the route
|
RouteGroup.RouteMounter |
renderer(ResponseRenderer renderer)
An optional renderer that will transform the model result of the RouteHandler into a body string
|
RouteGroup.RouteMounter |
restrict(RouteAccessControl accessControl)
An optional access control object that can require security for this route
|
RouteGroup.RouteMounter |
type(java.lang.String contentType)
The content type of the response.
|
RouteGroup.RouteMounter method(HttpMethod method)
RouteGroup.RouteMounter type(java.lang.String contentType)
RouteGroup.RouteMounter handler(RouteHandler handler)
RouteGroup.RouteMounter renderer(ResponseRenderer renderer)
RouteGroup.RouteMounter restrict(RouteAccessControl accessControl)
RouteGroup.RouteMounter concurrency(int concurrencyLimit, int waitTime)
concurrencyLimit
- Number of concurrent instances allowed to be executing at a timewaitTime
- Amount of time, in milliseconds, to wait for a slot to become available before a 503default RouteGroup.RouteMounter cache(long time, java.util.concurrent.TimeUnit timeUnit)
time
- Amount of time for items in the cache to be held. Not a guarantee, as values will be soft.timeUnit
- unit for the time argument.RouteGroup.RouteMounter cache(long time, java.util.concurrent.TimeUnit timeUnit, RouteGroup.CacheKeyGen keyGen)
Multikey
for this purpose.void mount()