RouteSelectorEvaluation

data class RouteSelectorEvaluation

Represents a result of a route evaluation against a call

Parameters

succeeded - indicates if a route matches current RoutingResolveContext

quality - indicates quality of this route as compared to other sibling routes

parameters - is an instance of Parameters with parameters filled by RouteSelector

segmentIncrement - is a value indicating how many path segments has been consumed by a selector

Constructors

<init>

RouteSelectorEvaluation(
    succeeded: Boolean,
    quality: Double,
    parameters: Parameters = Parameters.Empty,
    segmentIncrement: Int = 0)

Represents a result of a route evaluation against a call

Properties

parameters

val parameters: Parameters

is an instance of Parameters with parameters filled by RouteSelector

quality

val quality: Double

indicates quality of this route as compared to other sibling routes

segmentIncrement

val segmentIncrement: Int

is a value indicating how many path segments has been consumed by a selector

succeeded

val succeeded: Boolean

indicates if a route matches current RoutingResolveContext

Companion Object Properties

Constant

Route evaluation succeeded for a constant value

ConstantPath

val ConstantPath: RouteSelectorEvaluation

Route evaluation succeeded for a single path segment with a constant value

Failed

Route evaluation failed to succeed, route doesn’t match a context

Missing

Route evaluation succeeded for a missing optional value

WildcardPath

val WildcardPath: RouteSelectorEvaluation

Route evaluation succeeded for a wildcard path segment

qualityConstant

const val qualityConstant: Double

Quality of RouteSelectorEvaluation when a constant value has matched

qualityMethodParameter

const val qualityMethodParameter: Double

Quality of RouteSelectorEvaluation when a HTTP method parameter has matched

qualityMissing

const val qualityMissing: Double

Quality of RouteSelectorEvaluation when an optional parameter was missing

qualityParameter

const val qualityParameter: Double

Generic quality of RouteSelectorEvaluation to use as reference when some specific parameter has matched

qualityParameterWithPrefixOrSuffix

const val qualityParameterWithPrefixOrSuffix: Double

Quality of RouteSelectorEvaluation when a parameter with prefix or suffix has matched

qualityPathParameter

const val qualityPathParameter: Double

Quality of RouteSelectorEvaluation when a path parameter has matched

qualityQueryParameter

const val qualityQueryParameter: Double

Quality of RouteSelectorEvaluation when a query parameter has matched

qualityTailcard

const val qualityTailcard: Double

Quality of RouteSelectorEvaluation when a tailcard match has occurred

qualityTransparent

const val qualityTransparent: Double

Quality of RouteSelectorEvaluation that doesn’t have it’s own priority but should delegate evaluation to it’s children

qualityWildcard

const val qualityWildcard: Double

Quality of RouteSelectorEvaluation when a wildcard has matched