HostRouteSelector

data class HostRouteSelector : RouteSelector

Evaluates a route against a request’s host and port

Parameters

hostList - contains exact host names

hostPatterns - contains host patterns to match

portsList - contains possible ports or empty to match all ports

Constructors

<init>

HostRouteSelector(
    hostList: List<String>,
    hostPatterns: List<Regex>,
    portsList: List<Int>)

Evaluates a route against a request’s host and port

Properties

hostList

val hostList: List<String>

contains exact host names

hostPatterns

val hostPatterns: List<Regex>

contains host patterns to match

portsList

val portsList: List<Int>

contains possible ports or empty to match all ports

Inherited Properties

quality

val quality: Double

indicates how good this selector is compared to siblings

Functions

evaluate

fun evaluate(
    context: RoutingResolveContext,
    segmentIndex: Int
): RouteSelectorEvaluation

Evaluates this selector against context and a path segment at segmentIndex

toString

fun toString(): String

Companion Object Properties

HostNameParameter

const val HostNameParameter: String

Parameter name for RoutingApplicationCall.parameters for request host

PortParameter

const val PortParameter: String

Parameter name for RoutingApplicationCall.parameters for request port