RouteList class
Maintains application routes in dispatch priority order.
Methods
| add |
Adds a route and orders it by route kind and rank. |
| [iterator]() | Iterates over routes in dispatch priority order. |
Method Details
addRoute(Selector, RouteHandler<TState>, boolean, number, string[], boolean)
Adds a route and orders it by route kind and rank.
function addRoute(selector: Selector, handler: RouteHandler<TState>, isInvokeRoute?: boolean, rank?: number, authHandlers?: string[], isAgenticRoute?: boolean): this
Parameters
- selector
- Selector
Selector that determines whether the route matches.
- handler
-
RouteHandler<TState>
Handler invoked for a matching route.
- isInvokeRoute
-
boolean
Whether the route handles invoke activities.
- rank
-
number
Rank used to order routes of the same kind.
- authHandlers
-
string[]
Authentication handlers required by the route.
- isAgenticRoute
-
boolean
Whether the route handles agentic requests.
Returns
this
This route list.
[iterator]()
Iterates over routes in dispatch priority order.
function [iterator](): Iterator<AppRoute<TState>>
Returns
Iterator<AppRoute<TState>>
An iterator over the registered routes.