Daraja HTTP Framework 3.0-MS1
HTTP server framework for Object Pascal
|
Web Component handler. More...
Public Member Functions | |
SetContext (const IContext Context) | |
TdjWebComponentHolder | AddWebComponent (TdjWebComponentClass ComponentClass, const string PathSpec) |
Add a Web Component. | |
AddWithMapping (TdjWebComponentHolder Holder, const string PathSpec) | |
Add a Web Component holder with mapping. | |
AddFilterWithMapping (TdjWebFilterHolder Holder, const string PathSpec) | |
Add a Web Filter, specifying a WebFilter holder instance and the mapped WebComponent name. | |
TdjWebComponentHolder | FindHolder (TdjWebComponentClass WebComponentClass) |
Create a TdjWebComponentHolder for a WebComponentClass. | |
Handle (const string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
Find a TdjWebFilterMapping for a named WebFilter. | |
InvokeService (TdjWebComponent Comp, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
DoStart () | |
DoStop () | |
Public Member Functions inherited from TdjAbstractHandler | |
TdjAbstractHandler () | |
Constructor. | |
DoStart () | |
Start the handler. | |
DoStop () | |
Start the handler. | |
Handle (const string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
Handle a HTTP request. | |
Public Member Functions inherited from TdjLifeCycle | |
Start () | |
Start the handler. | |
Stop () | |
Stop the handler. | |
Boolean | IsStarted () |
Boolean | IsStopped () |
Protected Member Functions | |
TdjWebComponentHolder | FindComponent (const string ATarget) |
AddMapping (TdjWebComponentMapping Mapping) | |
Protected Member Functions inherited from TdjLifeCycle | |
DoStart () | |
Execute the custom start code. | |
DoStop () | |
Execute the custom stop code. | |
CheckStarted () | |
Raises an exception if the lifecycle is in "started" state. | |
CheckStopped () | |
Raises an exception if the lifecycle is in "stopped" state. | |
Protected Attributes | |
TdjWebComponentHolders | WebComponents |
TdjWebFilterHolders | WebFilters |
Additional Inherited Members | |
Public Attributes inherited from TdjLifeCycle | |
Boolean | Started |
True if the state is "started". | |
Boolean | Stopped |
True if the state is "stopped". | |
Web Component handler.
An instance of this class is created per context.
It holds a list of web components and their path mappings, and passes incoming requests to the matching web component.
TdjWebComponentHandler::AddFilterWithMapping | ( | TdjWebFilterHolder | Holder, |
const string | PathSpec ) |
Add a Web Filter, specifying a WebFilter holder instance and the mapped WebComponent name.
FilterClass | WebFilter class |
WebComponent | name |
Exception | if the WebFilter can not be added Add a Web Filter, specifying a WebFilter class and the mapped path. |
FilterClass | WebFilter class |
PathSpec | mapped path |
Exception | if the WebFilter can not be added |
Referenced by TdjWebComponentContextHandler::AddFilterWithMapping(), and TdjWebComponentContextHandler::AddWebFilter().
TdjWebComponentHolder TdjWebComponentHandler::AddWebComponent | ( | TdjWebComponentClass | ComponentClass, |
const string | PathSpec ) |
Add a Web Component.
ComponentClass | WebComponent class |
PathSpec | path specification |
EWebComponentException | if the Web Component can not be added |
Referenced by TdjWebComponentContextHandler::AddWebComponent().
TdjWebComponentHandler::AddWithMapping | ( | TdjWebComponentHolder | Holder, |
const string | PathSpec ) |
Add a Web Component holder with mapping.
Holder | a Web Component holder |
PathSpec | a path spec |
Referenced by TdjWebComponentContextHandler::AddWebComponent(), and TdjWebComponentContextHandler::AddWebComponent().
TdjWebComponentHolder TdjWebComponentHandler::FindHolder | ( | TdjWebComponentClass | WebComponentClass | ) |
Create a TdjWebComponentHolder for a WebComponentClass.
WebComponentClass | the Web Component class |
WebComponentClass | the Web Component class |
Referenced by TdjWebComponentContextHandler::AddWebComponent().
TdjWebComponentHandler::Handle | ( | const string | Target, |
TdjServerContext | Context, | ||
TdjRequest | Request, | ||
TdjResponse | Response ) |
Find a TdjWebFilterMapping for a named WebFilter.
WebFilterName | the Web Filter name |
Target | Request target |
Context | HTTP server context |
Request | HTTP request |
Response | HTTP response |
EWebComponentException | if an exception occurs that interferes with the component's normal operation |
Referenced by TdjWebComponentContextHandler::DoHandle().
|
protected |
|
protected |