
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 1.7.1 API)
org.spincast.plugins.routing
Class RouteDefault<R extends RequestContext<?>>
- java.lang.Object
-
- org.spincast.plugins.routing.RouteDefault<R>
-
- All Implemented Interfaces:
- Route<R>
public class RouteDefault<R extends RequestContext<?>>
extends Object
implements Route<R>
-
-
Constructor Summary
Constructors
Constructor and 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)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods
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
Route.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
toString()
-
-
Constructor Detail
-
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)
Constructor
-
Method Detail
-
getHttpMethods
public Set<HttpMethod> getHttpMethods()
Description copied from interface: Route
The HTTP methods
this route applies to.
- Specified by:
getHttpMethods
in interface Route<R extends RequestContext<?>>
-
getAcceptedContentTypes
public Set<String> 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
public String getId()
Description copied from interface: Route
The route id.
- Specified by:
getId
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
public StaticResource<R> 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
public String 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
public Set<RoutingType> 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
public List<Handler<R>> getBeforeFilters()
Description copied from interface: Route
The "before" filters, if any.
- Specified by:
getBeforeFilters
in interface Route<R extends RequestContext<?>>
-
getMainHandler
public Handler<R> getMainHandler()
Description copied from interface: Route
The main handler.
- Specified by:
getMainHandler
in interface Route<R extends RequestContext<?>>
-
getAfterFilters
public List<Handler<R>> 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
public Set<String> 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
public Object getSpecs()
Description copied from interface: Route
The optional specs for the route.
- Specified by:
getSpecs
in interface Route<R extends RequestContext<?>>
-
getSpecsParameters
public List<Object> 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<?>>
Copyright © 2019. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy