public.javadoc.org.spincast.plugins.routing.RouteDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
RouteDefault (org.spincast:spincast-framework 2.1.1 API)
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
Constructor
Description
RouteDefault(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 Type
Method
Description
The Content-Types
this 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.
The HTTP methods
this route applies to.
getId()
The route id.
The main handler.
getPath()
The route path.
int
The position at which this route should be run during a
routing process.
The routing types
the route should be considered for.
getSpecs()
The optional specs for the route.
Optional specs parameters.
Returns the StaticResource
to serve or
null
if this is not a
route for a static resource (ie if
Route.isStaticResourceRoute()
) doesn't return
true
.
boolean
Should a request for a resource be skipped?
boolean
Is this route ignored when specs are
generated?
boolean
Is this a route added by Spincast itself
or by a plugin? Otherwise, the route is
considered as an application route.
boolean
Is this a route for a resource? It is
if it was was started using
Router.dir(String)
or Router.file(String)
.
boolean
Is 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: Route
The HTTP methods
this route applies to.
- Specified by:
getHttpMethods
in interface Route<R extends RequestContext<?>>
-
getAcceptedContentTypes
Description copied from interface: Route
The Content-Types
this route
accepts (names all lowercased).
- Specified by:
getAcceptedContentTypes
in interface Route<R extends RequestContext<?>>
-
getId
Description copied from interface: Route
The route id.
- Specified by:
getId
in interface Route<R extends RequestContext<?>>
-
getClasses
Description copied from interface: Route
The route's classes.
- Specified by:
getClasses
in interface Route<R extends RequestContext<?>>
-
isWebsocketRoute
public boolean isWebsocketRoute()
Description copied from interface: Route
Is this a Websocket route?
- Specified by:
isWebsocketRoute
in interface Route<R extends RequestContext<?>>
-
isStaticResourceRoute
public boolean isStaticResourceRoute()
Description copied from interface: Route
Is this a route for a resource? It is
if it was was started using
Router.dir(String)
or Router.file(String)
.
On a resource route, we may want to skip some filters,
for example.
- Specified by:
isStaticResourceRoute
in interface Route<R extends RequestContext<?>>
-
getStaticResource
Description copied from interface: Route
Returns the StaticResource
to serve or
null
if this is not a
route for a static resource (ie if
Route.isStaticResourceRoute()
) doesn't return
true
.
- Specified by:
getStaticResource
in interface Route<R extends RequestContext<?>>
-
isSpicastCoreRouteOrPluginRoute
public boolean isSpicastCoreRouteOrPluginRoute()
Description copied from interface: Route
Is this a route added by Spincast itself
or by a plugin? Otherwise, the route is
considered as an application route.
- Specified by:
isSpicastCoreRouteOrPluginRoute
in interface Route<R extends RequestContext<?>>
-
getPath
Description copied from interface: Route
The route path.
- Specified by:
getPath
in interface Route<R extends RequestContext<?>>
-
isSkipResourcesRequests
public boolean isSkipResourcesRequests()
Description copied from interface: Route
Should a request for a resource be skipped?
Only used if the current route is a filter.
- Specified by:
isSkipResourcesRequests
in interface Route<R extends RequestContext<?>>
-
getRoutingTypes
Description copied from interface: Route
The routing types
the route should be considered for.
- Specified by:
getRoutingTypes
in interface Route<R extends RequestContext<?>>
-
getBeforeFilters
Description copied from interface: Route
The "before" filters, if any.
- Specified by:
getBeforeFilters
in interface Route<R extends RequestContext<?>>
-
getMainHandler
Description copied from interface: Route
The main handler.
- Specified by:
getMainHandler
in interface Route<R extends RequestContext<?>>
-
getAfterFilters
Description copied from interface: Route
The "after" filters, if any.
- Specified by:
getAfterFilters
in interface Route<R extends RequestContext<?>>
-
getPosition
public int getPosition()
Description copied from interface: Route
The position at which this route should be run during a
routing process.
- Specified by:
getPosition
in interface Route<R extends RequestContext<?>>
-
getFilterIdsToSkip
Description copied from interface: Route
The ids of the filters that should be skipped for this
route.
- Specified by:
getFilterIdsToSkip
in interface Route<R extends RequestContext<?>>
-
getSpecs
Description copied from interface: Route
The optional specs for the route.
- Specified by:
getSpecs
in interface Route<R extends RequestContext<?>>
-
getSpecsParameters
Description copied from interface: Route
Optional specs parameters.
- Specified by:
getSpecsParameters
in interface Route<R extends RequestContext<?>>
-
isSpecsIgnore
public boolean isSpecsIgnore()
Description copied from interface: Route
Is this route ignored when specs are
generated?
- Specified by:
isSpecsIgnore
in interface Route<R extends RequestContext<?>>
-
toString