Package rife.engine
Interface Route
public interface Route
Interface describing a route that leads to a RIFE2 web execution
Element
.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionThe default identifier that can be used when referring to an element of this route.void
finalizeElementInstance
(Element element, Context context) Finalize an element instance for this route.The class of the element of this route.methods()
The request methods that this route responds to.obtainElementInstance
(Context context) Returns an executionElement
instance to handle this route with.path()
The URL path that this route responds to.The way this route is handling the path info section.void
prepareElementInstance
(Element element, Context context) Prepare an executionElement
instance to handle this route with.router()
The router used to create the route.
-
Method Details
-
router
Router router()The router used to create the route.- Returns:
- this route's router
- Since:
- 1.0
-
methods
RequestMethod[] methods()The request methods that this route responds to.- Returns:
- this route's request methods; or
null
if the route should respond to all methods - Since:
- 1.0
-
path
String path()The URL path that this route responds to.- Returns:
- this route's path
- Since:
- 1.0
-
pathInfoHandling
PathInfoHandling pathInfoHandling()The way this route is handling the path info section.- Returns:
- this route's path info handling
- Since:
- 1.0
-
defaultElementId
String defaultElementId()The default identifier that can be used when referring to an element of this route.- Returns:
- this route's default element ID
- Since:
- 1.0
-
getElementClass
Class getElementClass()The class of the element of this route.- Returns:
- this route's element class
- Since:
- 1.0
-
obtainElementInstance
Returns an executionElement
instance to handle this route with. Note that the lifecycle of theElement
depends on the implementer of this interface. Make sure you understand the implications of this lifecycle as it might have an influence on performance or cause unintended side effects.- Parameters:
context
- the web engine context for which to obtain an element instance for- Returns:
- an element instance to handle this route
- Since:
- 1.0
-
prepareElementInstance
Prepare an executionElement
instance to handle this route with.Each implementer of this interface is free to prepare the
Element
instance as it best sees fit.- Parameters:
element
- the element to preparecontext
- the web engine context for which to obtain an element instance for- Since:
- 1.0
-
finalizeElementInstance
Finalize an element instance for this route.Each implementer of this interface is free to finalize the
Element
instance as it best sees fit.- Parameters:
element
- the element to finalizecontext
- the context in which the element should be finalized- Since:
- 1.0
-