Route

case class Route(routeMatchers: Seq[RouteMatcher], action: Action, contextPath: HttpServletRequest => String, metadata: Map[Symbol, Any])

A route is a set of matchers and an action. A route is considered to match if all of its route matchers return Some. If a route matches, its action may be invoked. The route parameters extracted by the matchers are made available to the action.

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(requestPath: String): Option[MatchedRoute]

Optionally returns this route's action and the multi-map of route parameters extracted from the matchers. Each matcher's returned params are merged into those of the previous. If any matcher returns None, None is returned. If there are no route matchers, some empty map is returned.

Optionally returns this route's action and the multi-map of route parameters extracted from the matchers. Each matcher's returned params are merged into those of the previous. If any matcher returns None, None is returned. If there are no route matchers, some empty map is returned.

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Returns:

a string representation of the object.

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product

Concrete fields

lazy val isReversible: Boolean

Determines whether this is a reversible route.

Determines whether this is a reversible route.

The reversible matcher of a route is the first reversible matcher, if any. This matcher may be used to generate URIs.

The reversible matcher of a route is the first reversible matcher, if any. This matcher may be used to generate URIs.