Packages

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) 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, 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. RouterBase
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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)

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(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  13. macro def debug(message: Any, cause: Throwable): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  14. macro def debug(message: Any): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. macro def error(message: Any, cause: Throwable): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  17. macro def error(message: Any): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  18. val filterInstance: Option[HttpFilterType]
  19. val filterSurface: Option[Surface]
  20. def findRoute[Req](request: Req)(implicit arg0: HttpRequestAdapter[Req]): Option[RouteMatch]
  21. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def hasNoOperation: Boolean
  23. macro def info(message: Any, cause: Throwable): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  24. macro def info(message: Any): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  25. def isEmpty: Boolean
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def isLeafFilter: Boolean
  28. val localRoutes: Seq[Route]
  29. macro def logAt(logLevel: LogLevel, message: Any): Unit
    Attributes
    protected
    Definition Classes
    LoggingMethods
  30. lazy val logger: Logger
    Attributes
    protected[this]
    Definition Classes
    LazyLogger
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. def productElementNames: Iterator[String]
    Definition Classes
    Product
  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(classOf[java.lang.InterruptedException])
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  44. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  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 RouterBase

Inherited from AnyRef

Inherited from Any

Ungrouped