Unit BrookURLRouter

Description

Contains classes for fast URL routing.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EBrookURLRoute Handles exceptions related to route classes.
Class TBrookURLRoute Class to represent a URL route item.
Class TBrookURLRoutesEnumerator List enumerator for TBrookURLRoutes.
Class EBrookURLRoutes Handles exceptions related to routes classes.
Class TBrookURLRoutes Class to represent an list of URL routes.
Class TBrookURLRouter URL router component.

Types

TBrookURLRouteMatchEvent = procedure(ARoute: TBrookURLRoute) of object;
TBrookURLRouteRequestEvent = procedure(ASender: TObject; ARoute: TBrookURLRoute; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse) of object;
TBrookURLRouteRequestMethodEvent = procedure(ASender: TObject; ARoute: TBrookURLRoute; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse; var AAllowed: Boolean) of object;
TBrookURLRouteClass = class of TBrookURLRoute;
TBrookURLRouterRouteEvent = procedure(ASender: TObject; const ARoute: string; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse) of object;

Constants

SBrookInactiveRouter = 'Inactive router.';
SBrookNoRoutesDefined = 'No routes defined.';
SBrookEmptyRoutePattern = '%s: pattern cannot be empty.';
SBrookRouteAlreadyExists = '%s: pattern ''%s'' already exists in ''%s''.';
SBrookRequestMethodNotAllowed = 'Request method not allowed: %s.';
SBrookRequestNoMethodDefined = 'No method(s) defined.';
SBrookRouteNotFound = 'Route not found: %s.';
SBrookDefaultRouteAlreadyExists = 'A default route already exists.';

Description

Types

TBrookURLRouteMatchEvent = procedure(ARoute: TBrookURLRoute) of object;

Event signature used by TBrookURLRoute to notify a route matching.

TBrookURLRouteRequestEvent = procedure(ASender: TObject; ARoute: TBrookURLRoute; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse) of object;

Event signature used by TBrookURLRoute to notify a client request.

TBrookURLRouteRequestMethodEvent = procedure(ASender: TObject; ARoute: TBrookURLRoute; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse; var AAllowed: Boolean) of object;

Event signature used by TBrookURLRoute to notify a request method matching.

TBrookURLRouteClass = class of TBrookURLRoute;

Class-reference for TBrookURLRoute.

TBrookURLRouterRouteEvent = procedure(ASender: TObject; const ARoute: string; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse) of object;

Event signature used by TBrookURLRouter to handle routing.

Constants

SBrookInactiveRouter = 'Inactive router.';

Error message 'Inactive router.'.

SBrookNoRoutesDefined = 'No routes defined.';

Error message 'No routes defined.'.

SBrookEmptyRoutePattern = '%s: pattern cannot be empty.';

Error message '<new-class>: pattern cannot be empty.'.

SBrookRouteAlreadyExists = '%s: pattern ''%s'' already exists in ''%s''.';

Error message '<new-class>: pattern <pattern> already exists in <existing-class>.'.

SBrookRequestMethodNotAllowed = 'Request method not allowed: %s.';

Error message 'Request method not allowed: <method>.'.

SBrookRequestNoMethodDefined = 'No method(s) defined.';

Error message 'No routes defined.'.

SBrookRouteNotFound = 'Route not found: %s.';

Error message 'Route not found: <route>.'.

SBrookDefaultRouteAlreadyExists = 'A default route already exists.';

Error message 'A default route already exists.'.


Generated by PasDoc 0.16.0.