case class Router(surface: Option[Surface] = None, children: Seq[Router] = Seq.empty, localRoutes: Seq[Route] = Seq.empty, filterSurface: Option[Surface] = None, filterInstance: Option[HttpFilterType] = None, controllerInstance: Option[Any] = None) extends RouterBase with LogSupport with Product with Serializable

Router defines mappings from HTTP requests to Routes.

Router can be nested

  • Router1 with Filter1
    • Router2: endpoints e1, e2
    • Router3: endpoints e3 with Filter2
  • Router4: endpoints e4

From this router definition, the backend HTTP server specific implementation will build a mapping table like this: e1 -> Filter1 andThen process(e1) e2 -> Filter1 andThen process(e2) e3 -> Filter1 andThen Filter2 andThen process(e3) e4 -> process(e4)

Linear Supertypes
Product, Equals, LogSupport, LazyLogger, LoggingMethods, Serializable, Serializable, RouterBase, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Router
  2. Product
  3. Equals
  4. LogSupport
  5. LazyLogger
  6. LoggingMethods
  7. Serializable
  8. Serializable
  9. RouterBase
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Router(surface: Option[Surface] = None, children: Seq[Router] = Seq.empty, localRoutes: Seq[Route] = Seq.empty, filterSurface: Option[Surface] = None, filterInstance: Option[HttpFilterType] = None, controllerInstance: Option[Any] = None)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. macro def add[Controller]: Router

    Add methods annotated with @Endpoint to the routing table

    Add methods annotated with @Endpoint to the routing table

    Definition Classes
    RouterBase
  5. def addChild(childRouter: Router): Router

    Add a child and and return a new Router with this child node

  6. def addInternal(controllerSurface: Surface, controllerMethodSurfaces: Seq[MethodSurface]): Router

    Internal only method for adding the surface of the controller

  7. def andThen(next: Router): Router
  8. def andThen(filter: HttpFilterType): Router
  9. macro def andThen[Controller]: Router
    Definition Classes
    RouterBase
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. val children: Seq[Router]
  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  13. val controllerInstance: Option[Any]
  14. macro def debug(message: Any, cause: Throwable): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  15. macro def debug(message: Any): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. macro def error(message: Any, cause: Throwable): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  18. macro def error(message: Any): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  19. val filterInstance: Option[HttpFilterType]
  20. val filterSurface: Option[Surface]
  21. def findRoute[Req](request: Req)(implicit arg0: HttpRequestAdapter[Req]): Option[RouteMatch]
  22. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. def hasNoOperation: Boolean
  24. macro def info(message: Any, cause: Throwable): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  25. macro def info(message: Any): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  26. def isEmpty: Boolean
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. def isLeafFilter: Boolean
  29. val localRoutes: Seq[Route]
  30. macro def logAt(logLevel: LogLevel, message: Any): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  31. lazy val logger: Logger
    Attributes
    protected[this]
    Definition Classes
    LazyLogger
  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  35. def routes: Seq[Route]
  36. val surface: Option[Surface]
  37. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  38. def toString(): String
    Definition Classes
    Router → AnyRef → Any
  39. macro def trace(message: Any, cause: Throwable): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  40. macro def trace(message: Any): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  41. def verifyRoutes: Unit

    Call this method to verify duplicated routes in an early phase

  42. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  44. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. macro def warn(message: Any, cause: Throwable): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  46. macro def warn(message: Any): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  47. def withFilter(newFilterSurface: Surface): Router

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Product

Inherited from Equals

Inherited from LogSupport

Inherited from LazyLogger

Inherited from LoggingMethods

Inherited from Serializable

Inherited from Serializable

Inherited from RouterBase

Inherited from AnyRef

Inherited from Any

Ungrouped