RoutingHandler

abstract class RoutingHandler<R, F, Self : RouteMatcher<R, F>>(val routes: List<RouteMatcher<R, F>>, copy: (List<RouteMatcher<R, F>>) -> Self) : Function1<Request, R> , RouteMatcher<R, F>

Composite handler which can potentially service many different URL patterns. Should return a specified Response if it cannot service a particular Request.

Note that generally there should be no reason for the API user to implement this interface over and above the implementations that already exist. The interface is public only because we have not found a way to hide it from the API user in an API-consistent manner.

Inheritors

Constructors

Link copied to clipboard
constructor(routes: List<RouteMatcher<R, F>>, copy: (List<RouteMatcher<R, F>>) -> Self)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun Events.and(next: Events): Events
Link copied to clipboard
fun (Request) -> Boolean.asRouter(name: String = ""): Router
Link copied to clipboard
Link copied to clipboard
fun HttpHandler.debug(out: PrintStream = System.out, debugStream: Boolean = false): (request: Request) -> Response
Link copied to clipboard
open operator override fun invoke(request: Request): R
Link copied to clipboard
open override fun match(request: Request): RoutingMatch<R>
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Convert a synchronous HttpHandler API to mimic AsyncHttpClient

Link copied to clipboard
open override fun withBasePath(prefix: String): Self
Link copied to clipboard
open override fun withFilter(new: F): Self
Link copied to clipboard
open override fun withRouter(other: Router): Self