Package org.spincast.plugins.routing
Class RouteDefault<R extends RequestContext<?>>
java.lang.Object
org.spincast.plugins.routing.RouteDefault<R>
- All Implemented Interfaces:
Route<R>
-
Constructor Summary
ConstructorsConstructorDescriptionRouteDefault(String id, boolean isWebsocketRoute, boolean isResourceRoute, StaticResource<R> staticResource, boolean spicastCoreRouteOrPluginRoute, Set<HttpMethod> httpMethods, String path, Set<RoutingType> routingTypes, List<Handler<R>> beforeFilters, Handler<R> mainHandler, List<Handler<R>> afterFilters, int position, Set<String> acceptedContentTypes, Set<String> filterIdsToSkip, boolean skipResources, Object specs, Object[] specsParameters, boolean specsIgnore, Set<String> classes) Constructor -
Method Summary
Modifier and TypeMethodDescriptionTheContent-Typesthis route accepts (names all lowercased).The "after" filters, if any.The "before" filters, if any.The route's classes.The ids of the filters that should be skipped for this route.TheHTTP methodsthis route applies to.getId()The route id.The main handler.getPath()The route path.intThe position at which this route should be run during a routing process.Therouting typesthe route should be considered for.getSpecs()The optional specs for the route.Optional specs parameters.Returns theStaticResourceto serve ornullif this is not a route for a static resource (ie ifRoute.isStaticResourceRoute()) doesn't returntrue.booleanShould a request for a resource be skipped?booleanIs this route ignored when specs are generated?booleanIs this a route added by Spincast itself or by a plugin? Otherwise, the route is considered as an application route.booleanIs this a route for a resource? It is if it was was started usingRouter.dir(String)orRouter.file(String).booleanIs this a Websocket route?toString()
-
Constructor Details
-
RouteDefault
public RouteDefault(@Nullable String id, boolean isWebsocketRoute, boolean isResourceRoute, @Nullable StaticResource<R> staticResource, boolean spicastCoreRouteOrPluginRoute, Set<HttpMethod> httpMethods, String path, Set<RoutingType> routingTypes, @Nullable List<Handler<R>> beforeFilters, Handler<R> mainHandler, @Nullable List<Handler<R>> afterFilters, int position, @Nullable Set<String> acceptedContentTypes, @Nullable Set<String> filterIdsToSkip, boolean skipResources, @Nullable Object specs, @Nullable Object[] specsParameters, boolean specsIgnore, Set<String> classes) Constructor
-
-
Method Details
-
getHttpMethods
Description copied from interface:RouteTheHTTP methodsthis route applies to.- Specified by:
getHttpMethodsin interfaceRoute<R extends RequestContext<?>>
-
getAcceptedContentTypes
Description copied from interface:RouteTheContent-Typesthis route accepts (names all lowercased).- Specified by:
getAcceptedContentTypesin interfaceRoute<R extends RequestContext<?>>
-
getId
Description copied from interface:RouteThe route id.- Specified by:
getIdin interfaceRoute<R extends RequestContext<?>>
-
getClasses
Description copied from interface:RouteThe route's classes.- Specified by:
getClassesin interfaceRoute<R extends RequestContext<?>>
-
isWebsocketRoute
public boolean isWebsocketRoute()Description copied from interface:RouteIs this a Websocket route?- Specified by:
isWebsocketRoutein interfaceRoute<R extends RequestContext<?>>
-
isStaticResourceRoute
public boolean isStaticResourceRoute()Description copied from interface:RouteIs this a route for a resource? It is if it was was started usingRouter.dir(String)orRouter.file(String).On a resource route, we may want to skip some filters, for example.
- Specified by:
isStaticResourceRoutein interfaceRoute<R extends RequestContext<?>>
-
getStaticResource
Description copied from interface:RouteReturns theStaticResourceto serve ornullif this is not a route for a static resource (ie ifRoute.isStaticResourceRoute()) doesn't returntrue.- Specified by:
getStaticResourcein interfaceRoute<R extends RequestContext<?>>
-
isSpicastCoreRouteOrPluginRoute
public boolean isSpicastCoreRouteOrPluginRoute()Description copied from interface:RouteIs this a route added by Spincast itself or by a plugin? Otherwise, the route is considered as an application route.- Specified by:
isSpicastCoreRouteOrPluginRoutein interfaceRoute<R extends RequestContext<?>>
-
getPath
Description copied from interface:RouteThe route path.- Specified by:
getPathin interfaceRoute<R extends RequestContext<?>>
-
isSkipResourcesRequests
public boolean isSkipResourcesRequests()Description copied from interface:RouteShould a request for a resource be skipped?Only used if the current route is a filter.
- Specified by:
isSkipResourcesRequestsin interfaceRoute<R extends RequestContext<?>>
-
getRoutingTypes
Description copied from interface:RouteTherouting typesthe route should be considered for.- Specified by:
getRoutingTypesin interfaceRoute<R extends RequestContext<?>>
-
getBeforeFilters
Description copied from interface:RouteThe "before" filters, if any.- Specified by:
getBeforeFiltersin interfaceRoute<R extends RequestContext<?>>
-
getMainHandler
Description copied from interface:RouteThe main handler.- Specified by:
getMainHandlerin interfaceRoute<R extends RequestContext<?>>
-
getAfterFilters
Description copied from interface:RouteThe "after" filters, if any.- Specified by:
getAfterFiltersin interfaceRoute<R extends RequestContext<?>>
-
getPosition
public int getPosition()Description copied from interface:RouteThe position at which this route should be run during a routing process.- Specified by:
getPositionin interfaceRoute<R extends RequestContext<?>>
-
getFilterIdsToSkip
Description copied from interface:RouteThe ids of the filters that should be skipped for this route.- Specified by:
getFilterIdsToSkipin interfaceRoute<R extends RequestContext<?>>
-
getSpecs
Description copied from interface:RouteThe optional specs for the route.- Specified by:
getSpecsin interfaceRoute<R extends RequestContext<?>>
-
getSpecsParameters
Description copied from interface:RouteOptional specs parameters.- Specified by:
getSpecsParametersin interfaceRoute<R extends RequestContext<?>>
-
isSpecsIgnore
public boolean isSpecsIgnore()Description copied from interface:RouteIs this route ignored when specs are generated?- Specified by:
isSpecsIgnorein interfaceRoute<R extends RequestContext<?>>
-
toString
-