routerOf

fun routerOf(default: String = "", job: Job = Job()): Router<String>

Creates a new simple String based Router

Parameters

default

default route

job

Job to be used by the Router


fun routerOf(default: Map<String, String> = emptyMap(), job: Job = Job()): MapRouter

Creates a new Map based Router

Parameters

default

default route

job

Job to be used by the Router


fun <T> routerOf(default: Route<T>, job: Job = Job()): Router<T>

Creates a new type based Router. Therefore, the given type must implement the Route interface.

Parameters

default

default route

job

Job to be used by the Router