StaticRoutingHttpHandler

data class StaticRoutingHttpHandler(pathSegments: String, resourceLoader: ResourceLoader, extraFileExtensionToContentTypes: Map<String, ContentType>, filter: Filter = Filter.NoOp) : RoutingHttpHandler

Constructors

Link copied to clipboard
constructor(pathSegments: String, resourceLoader: ResourceLoader, extraFileExtensionToContentTypes: Map<String, ContentType>, filter: Filter = Filter.NoOp)

Properties

Link copied to clipboard
open override val description: RouterDescription

Functions

Link copied to clipboard
fun Events.and(next: Events): Events
infix fun Router.and(that: Router): Router
Link copied to clipboard
fun (Request) -> Boolean.asRouter(description: String = unavailable.description): Router

Convert any predicate on a request into a router

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun HttpHandler.debug(out: PrintStream = System.out, debugStream: Boolean = false): (request: Request) -> Response
fun RoutingHttpHandler.debug(out: PrintStream = System.out, debugStream: Boolean = false): RoutingHttpHandler
Link copied to clipboard
open operator override fun invoke(request: Request): Response
Link copied to clipboard
open override fun match(request: Request): RouterMatch

Attempt to supply an HttpHandler which can service the passed request.

Link copied to clipboard
fun Events.then(next: Events): (Event) -> Unit
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(new: String): RoutingHttpHandler

Returns a Router which prepends the passed base path to the logic determining the match().

Link copied to clipboard
open override fun withFilter(new: Filter): RoutingHttpHandler

Returns a Router which applies the passed Filter to all received requests before servicing them.