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

qualityMissing

const val qualityMissing: Double

Quality of RouteSelectorEvaluation when an optional parameter was missing

qualityParameter

const val qualityParameter: Double

Quality of RouteSelectorEvaluation when a parameter has matched

qualityTailcard

const val qualityTailcard: Double

Quality of RouteSelectorEvaluation when a tailcard match has occurred

qualityWildcard

const val qualityWildcard: Double

Quality of RouteSelectorEvaluation when a wildcard has matched