Route class

Binds a RouteRule to a target Service, with a priority for ordering and optional per-service authentication.

Constructors

Route({required String name, required RouteRule rule, required Service target, int priority = 0, Authenticator? authenticator, Authorizer? authorizer, ConnectionAuthenticator? connectionAuthenticator})
Creates a route.

Properties

authenticator Authenticator?
The authenticator used for this route when the global coordinator delegates (or, with no coordinator, in addition to the global one). null means no per-service authenticator.
final
authorizer Authorizer?
The authorizer used for this route, overriding the hub-wide one. null falls back to the hub's authorizer.
final
connectionAuthenticator ConnectionAuthenticator?
The in-band connection authenticator for WebSocket upgrades to this route, overriding the hub-wide one.
final
hashCode int
The hash code for this object.
no setterinherited
name String
A descriptive name (usually the target service's name).
final
priority int
Higher priorities are preferred over lower ones when multiple routes match. Ties are broken by rule RouteRule.specificity, then registration order.
final
rule RouteRule
The rule that selects this route.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
target Service
The service that handles requests matching rule.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited