Package rife.engine

Interface Route


public interface Route
Interface describing a route that leads to a RIFE2 web execution Element.
Since:
1.0
  • 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

      Element obtainElementInstance(Context context)
      Returns an execution Element instance to handle this route with. Note that the lifecycle of the Element 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

      void prepareElementInstance(Element element, Context context)
      Prepare an execution Element 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 prepare
      context - the web engine context for which to obtain an element instance for
      Since:
      1.0
    • finalizeElementInstance

      void finalizeElementInstance(Element element, Context context)
      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 finalize
      context - the context in which the element should be finalized
      Since:
      1.0