install

fun <C : Any, B : Any> install(endpoints: Map<HttpMethod, String>, plugin: Plugin<Route, C, B>, configure: C.() -> Unit = {}): AbstractEndpoint

Installs a route plugin into every route listed in the endpoints map with a mapping of method -> route.

Return

this AbstractEndpoint to chain methods.

Parameters

endpoints

The endpoints mapped from method -> route to register it from.

plugin

The plugin to install

configure

The configuration block to configure this plugin.


fun <C : Any, B : Any> install(routes: List<String>, plugin: Plugin<Route, C, B>, configure: C.() -> Unit = {}): AbstractEndpoint

Installs a route plugin into every route listed in the routes list with the methods that are registered with it.

Return

this AbstractEndpoint to chain methods.

Parameters

routes

A list of routes to register it on, regardless of the method.

plugin

The plugin to install

configure

The configuration block to configure this plugin.


fun <C : Any, B : Any> install(plugin: Plugin<Route, C, B>, configure: C.() -> Unit = {}): AbstractEndpoint

Installs a route plugin into every route that is installed on this AbstractEndpoint.

Return

this AbstractEndpoint to chain methods.

Parameters

plugin

The plugin to install

configure

The configuration block to configure this plugin.


fun <C : Any, B : Any> install(route: String, plugin: Plugin<Route, C, B>, configure: C.() -> Unit = {}): AbstractEndpoint

Installs a route plugin on a specific route that is installed on this AbstractEndpoint.

Return

this AbstractEndpoint to chain methods.

Parameters

route

The route to install it on

plugin

The plugin to install

configure

The configuration block to configure this plugin.


fun <C : Any, B : Any> install(method: HttpMethod, plugin: Plugin<Route, C, B>, configure: C.() -> Unit = {}): AbstractEndpoint

Installs a Route plugin with the specified HttpMethod.

Parameters

method

HttpMethod to install on

plugin

Plugin to install

configure

configure method to configure the plugin


fun <C : Any, B : Any> install(method: HttpMethod, route: String, plugin: Plugin<Route, C, B>, configure: C.() -> Unit = {}): AbstractEndpoint

Installs a route plugin on a specific route AND method that is installed on this AbstractEndpoint.

Return

this AbstractEndpoint to chain methods.

Parameters

method

The HTTP method to use to find the route to install the plugin in.

route

The route to install it on

plugin

The plugin to install

configure

The configuration block to configure this plugin.