Router

play.api.routing.Router
See theRouter companion trait
object Router

Utilities for routing.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Router.type

Members list

Type members

Classlikes

object Attrs

Request attributes used by the router.

Request attributes used by the router.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Attrs.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Types

The type of the routes partial function

The type of the routes partial function

Attributes

Value members

Concrete methods

def concatPrefix(newPrefix: String, existingPrefix: String): String

Concatenate another prefix with an existing prefix, collapsing extra slashes. If the existing prefix is empty or "/" then the new prefix replaces the old one. Otherwise the new prefix is prepended to the old one with a slash in between, ignoring a final slash in the new prefix or an initial slash in the existing prefix.

Concatenate another prefix with an existing prefix, collapsing extra slashes. If the existing prefix is empty or "/" then the new prefix replaces the old one. Otherwise the new prefix is prepended to the old one with a slash in between, ignoring a final slash in the new prefix or an initial slash in the existing prefix.

Attributes

def from(routes: Routes): Router

Create a new router from the given partial function

Create a new router from the given partial function

Value parameters

routes

The routes partial function

Attributes

Returns

A router that uses that partial function

def load(env: Environment, configuration: Configuration): Option[Class[_ <: Router]]

Try to load the configured router class.

Try to load the configured router class.

Attributes

Returns

The router class if configured or if a default one in the root package was detected.

Concrete fields

val empty: Router

An empty router.

An empty router.

Never returns an handler from the routes function.

Attributes