Class TBrookURLRouter
Unit
Declaration
type TBrookURLRouter = class(TBrookHandledComponent)
Description
URL router component.
Hierarchy
- TObject
- TPersistent
- TComponent
- TBrookHandledComponent
- TBrookURLRouter
Overview
Methods
![]() |
constructor Create(AOwner: TComponent); override; |
![]() |
destructor Destroy; override; |
![]() |
function GetEnumerator: TBrookURLRoutesEnumerator; |
![]() |
function Add: TBrookURLRoute; inline; |
![]() |
procedure Remove(const APattern: string); inline; |
![]() |
procedure Clear; inline; |
![]() |
procedure Open; |
![]() |
procedure Close; |
![]() |
procedure Route(ASender: TObject; const APath: string; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse); overload; virtual; |
![]() |
procedure Route(ASender: TObject; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse); overload; virtual; |
Properties
![]() |
property Items[AIndex:Integer]: TBrookURLRoute read GetItem
write SetItem; |
![]() |
property Active: Boolean read FActive write SetActive stored IsActiveStored; |
![]() |
property Routes: TBrookURLRoutes read FRoutes write SetRoutes; |
![]() |
property OnRoute: TBrookURLRouterRouteEvent read FOnRoute write FOnRoute; |
![]() |
property OnNotFound: TBrookURLRouterRouteEvent read FOnNotFound
write FOnNotFound; |
![]() |
property OnActivate: TNotifyEvent read FOnActivate write FOnActivate; |
![]() |
property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate; |
Description
Methods
![]() |
constructor Create(AOwner: TComponent); override; |
|
Creates an instance of Parameters
| |
![]() |
destructor Destroy; override; |
|
Destroys an instance of | |
![]() |
function GetEnumerator: TBrookURLRoutesEnumerator; |
|
Creates an enumerator to iterate the routes through | |
![]() |
function Add: TBrookURLRoute; inline; |
|
Adds a new item to the routes list. ReturnsRoute item. | |
![]() |
procedure Remove(const APattern: string); inline; |
|
Removes an item from the routes list by its pattern. Parameters
| |
![]() |
procedure Clear; inline; |
|
Clears the routes list. | |
![]() |
procedure Open; |
|
Enabled the router component. | |
![]() |
procedure Close; |
|
Disables the router component. | |
![]() |
procedure Route(ASender: TObject; const APath: string; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse); overload; virtual; |
|
Routes a request passing a given path. Parameters
| |
![]() |
procedure Route(ASender: TObject; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse); overload; virtual; |
|
Routes a request obtaining path from the request object. Parameters
| |
Properties
![]() |
property Items[AIndex:Integer]: TBrookURLRoute read GetItem
write SetItem; |
![]() |
property Active: Boolean read FActive write SetActive stored IsActiveStored; |
|
Enabled/disables the router component. | |
![]() |
property Routes: TBrookURLRoutes read FRoutes write SetRoutes; |
|
Available | |
![]() |
property OnRoute: TBrookURLRouterRouteEvent read FOnRoute write FOnRoute; |
|
Event triggered when the router dispatches a route. | |
![]() |
property OnNotFound: TBrookURLRouterRouteEvent read FOnNotFound
write FOnNotFound; |
|
Event triggered when a route is not found. | |
![]() |
property OnActivate: TNotifyEvent read FOnActivate write FOnActivate; |
|
Event triggered when the router component is enabled. | |
![]() |
property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate; |
|
Event triggered when the router component is disabled. | |
Generated by PasDoc 0.16.0.

