public.javadoc.org.spincast.core.routing.Route.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.
Route (org.spincast:spincast-framework 1.0.0 API)
org.spincast.core.routing
Interface Route<R extends RequestContext<?>>
-
- All Known Implementing Classes:
- RouteDefault
public interface Route<R extends RequestContext<?>>
Represents a regular route and all its informations.
-
-
Method Summary
All Methods Instance Methods Abstract 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.
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
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)
.
-
-
Method Detail
-
getId
String getId()
The route id.
-
isStaticResourceRoute
boolean isStaticResourceRoute()
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.
-
getStaticResource
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
.
-
isSpicastCoreRouteOrPluginRoute
boolean isSpicastCoreRouteOrPluginRoute()
Is this a route added by Spincast itself
or by a plugin? Otherwise, the route is
considered as an application route.
-
getPath
String getPath()
The route path.
-
isSkipResourcesRequests
boolean isSkipResourcesRequests()
Should a request for a resource be skipped?
Only used if the current route is a filter.
-
getHttpMethods
Set<HttpMethod> getHttpMethods()
The HTTP methods
this route applies to.
-
getAcceptedContentTypes
Set<String> getAcceptedContentTypes()
The Content-Types
this route
accepts (names all lowercased).
-
getRoutingTypes
Set<RoutingType> getRoutingTypes()
The routing types
the route should be considered for.
-
getPosition
int getPosition()
The position at which this route should be run during a
routing process.
Copyright © 2019. All rights reserved.