public interface Route<R extends RequestContext<?>>
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getAcceptedContentTypes()
The
Content-Types this route
accepts (names all lowercased). |
List<Handler<R>> |
getAfterFilters()
The "after" filters, if any.
|
List<Handler<R>> |
getBeforeFilters()
The "before" filters, if any.
|
Set<String> |
getFilterIdsToSkip()
The ids of the filters that should be skipped for this
route.
|
Set<HttpMethod> |
getHttpMethods()
The
HTTP methods this route applies to. |
String |
getId()
The route id.
|
Handler<R> |
getMainHandler()
The main handler.
|
String |
getPath()
The route path.
|
int |
getPosition()
The position at which this route should be run during a
routing process.
|
Set<RoutingType> |
getRoutingTypes()
The
routing types the route should be considered for. |
Object |
getSpecs()
The optional specs for the route.
|
List<Object> |
getSpecsParameters()
Optional specs parameters.
|
StaticResource<R> |
getStaticResource()
Returns the
StaticResource to serve or
null if this is not a
route for a static resource (ie if
isStaticResourceRoute()) doesn't return
true. |
boolean |
isSkipResourcesRequests()
Should a request for a resource be skipped?
|
boolean |
isSpecsIgnore()
Is this route ignored when specs are
generated?
|
boolean |
isSpicastCoreRouteOrPluginRoute()
Is this a route added by Spincast itself
or by a plugin? Otherwise, the route is
considered as an application route.
|
boolean |
isStaticResourceRoute()
Is this a route for a resource? It is
if it was was started using
Router.dir(String) or Router.file(String). |
boolean |
isWebsocketRoute()
Is this a Websocket route?
|
String getId()
boolean isWebsocketRoute()
boolean isStaticResourceRoute()
Router.dir(String) or Router.file(String).
On a resource route, we may want to skip some filters, for example.
StaticResource<R> getStaticResource()
StaticResource to serve or
null if this is not a
route for a static resource (ie if
isStaticResourceRoute()) doesn't return
true.boolean isSpicastCoreRouteOrPluginRoute()
String getPath()
boolean isSkipResourcesRequests()
Only used if the current route is a filter.
Set<HttpMethod> getHttpMethods()
HTTP methods this route applies to.Set<String> getAcceptedContentTypes()
Content-Types this route
accepts (names all lowercased).Set<RoutingType> getRoutingTypes()
routing types the route should be considered for.int getPosition()
Set<String> getFilterIdsToSkip()
Object getSpecs()
boolean isSpecsIgnore()
Copyright © 2019. All rights reserved.