open class Locations
Ktor feature that allows to handle and construct routes in a typed way.
You have to create data classes/objects representing parameterized routes and annotate them with Location. Then you can register sub-routes and handlers for those locations and create links to them using Locations.href.
class Configuration
Configuration for Locations. |
|
companion object Feature : ApplicationFeature<Application, Configuration, Locations>
Installable feature for Locations. |
Locations(application: Application)
Creates Locations service extracting path information from @Location annotation Locations(application: Application, routeService: LocationRouteService)
Ktor feature that allows to handle and construct routes in a typed way. |
val registeredLocations: List<LocationInfo>
All locations registered at the moment (Immutable list). |
fun createEntry(parent: Route, locationClass: KClass<*>): Route
Creates all necessary routing entries to match specified locationClass. |
|
fun href(location: Any): String
Constructs the url for location. |
|
fun <T : Any> resolve(locationClass: KClass<*>, call: ApplicationCall): T
Resolves parameters in a call to an instance of specified locationClass. fun <T : Any> resolve(locationClass: KClass<*>, parameters: Parameters): T
Resolves parameters to an instance of specified locationClass. fun <T : Any> resolve(parameters: Parameters): T
Resolves parameters to an instance of specified T. fun <T : Any> resolve(call: ApplicationCall): T
Resolves parameters in a call to an instance of specified T. |
val key: AttributeKey<Locations> |
fun install(pipeline: Application, configure: Configuration.() -> Unit): Locations |