DefaultRouter class

The default implementation of Router.

Implemented types

Constructors

DefaultRouter({Map<String, dynamic>? uriMapping, Map<int, dynamic>? errorMapping, Map<String, RequestFilter>? filterMapping, int cacheSize = 1000, bool protectRSP = true})
The constructor. *

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

filter(String uri, RequestFilter filter, {bool preceding = false}) → void
Maps the given URI to the given filter. *
override
getErrorHandler(dynamic error) → dynamic
Returns the error handler (RequestHandler) or a URI (String) based on the error thrown by a request handler.
override
getFilterAt(int iFilter) RequestFilter
Returns the filter at the given index.
override
getFilterIndex(HttpConnect connect, String uri, int iFilter) int?
Returns the index of the next matched request filter for the given URI and starting at the given index.
override
getHandler(HttpConnect connect, String uri) → dynamic
Retrieves the first matched request handler (RequestHandler) or forwarded URI (String) for the given URI.
override
map(String uri, dynamic handler, {bool preceding = false}) → void
Maps the given URI to the given handler. *
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shallCache(HttpConnect connect, String uri) bool
Retursn whether the mapping of the given uri shall be cached.
toString() String
A string representation of this object.
inherited

Operators

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