Daraja Framework
1.2
HTTP server framework for Object Pascal
|
Context Handler for Web Components. More...
Public Member Functions | |
TdjWebComponentContextHandler (const string ContextPath, Boolean Sessions=False) | |
Constructor. More... | |
~TdjWebComponentContextHandler () | |
Destructor. | |
AddWebComponent (const TdjWebComponentClass ComponentClass, const string PathSpec) | |
Add a Web Component. More... | |
Add (const TdjWebComponentClass ComponentClass, const string PathSpec) | |
Convenience method to add a Web Component. More... | |
AddWebComponent (const TdjWebComponentHolder Holder, const string PathSpec) | |
Add a Web Component. More... | |
Handle (string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
Handle a HTTP request. More... | |
DoStart () | |
Start the handler. | |
DoStop () | |
Stop the handler. | |
![]() | |
TdjContextHandler (const string ContextPath) | |
Create a ContextHandler. | |
~TdjContextHandler () | |
Destructor. | |
IContext | GetCurrentContext () |
The internal IContext field. | |
SetInitParameter (const string Key, const string Value) | |
Set initialization parameter. More... | |
DoStart () | |
Start the handler. | |
DoStop () | |
Stop the handler. | |
Handle (string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
Handle a HTTP request. More... | |
![]() | |
AddHandler (const IHandler Handler) | |
Add a handler to the container. More... | |
RemoveHandler (const IHandler Handler) | |
Remove a handler from the container. More... | |
DoStart () | |
Start the handler. | |
DoStop () | |
Stop the handler. | |
Handle (string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
Handle a HTTP request. More... | |
![]() | |
TdjAbstractHandler () | |
Constructor. | |
DoStart () | |
Start the handler. | |
DoStop () | |
Start the handler. | |
Handle (string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
Handle a HTTP request. More... | |
![]() | |
TdjLifeCycle () | |
Constructor. | |
Start () | |
Start the handler. More... | |
Stop () | |
Stop the handler. More... | |
Boolean | IsStarted () |
Boolean | IsStopped () |
Protected Member Functions | |
DoHandle (const string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
![]() | |
Boolean | ContextMatches (const string ConnectorName, const string Target) |
Check if the Document matches this context. More... | |
string | ToConnectorName (TdjServerContext Context) |
Creates connector name in the form 'host:port'. More... | |
![]() | |
TIdHTTPSession | GetSession (TdjServerContext Context, TdjRequest Request, TdjResponse Response, const Boolean Create) |
Get a HTTP session. | |
![]() | |
AddHandler (const IHandler Handler) | |
Add a handler. More... | |
RemoveHandler (const IHandler Handler) | |
Remove a handler. More... | |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
TStrings | ConnectorNames |
string | ContextPath |
IHandler | ErrorHandler |
![]() | |
IHandler | Handler |
![]() | |
Boolean | Started |
True if the state is "started". More... | |
Boolean | Stopped |
True if the state is "stopped". More... | |
Context Handler for Web Components.
TdjWebComponentContextHandler::TdjWebComponentContextHandler | ( | const string | ContextPath, |
Boolean | Sessions = False |
||
) |
Constructor.
ContextPath | the context path |
Sessions | enable HTTP sessions |
References TdjHandlerWrapper::AddHandler().
TdjWebComponentContextHandler::Add | ( | const TdjWebComponentClass | ComponentClass, |
const string | PathSpec | ||
) |
Convenience method to add a Web Component.
ComponentClass | WebComponent class |
PathSpec | path specification |
EWebComponentException | if the Web Component can not be added |
References AddWebComponent(), TdjWebComponentHandler::AddWithMapping(), and TdjWebComponentHandler::FindHolder().
TdjWebComponentContextHandler::AddWebComponent | ( | const 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 Add().
TdjWebComponentContextHandler::AddWebComponent | ( | const TdjWebComponentHolder | Holder, |
const string | PathSpec | ||
) |
Add a Web Component.
Holder | holds information about the Web Component |
PathSpec | path specification |
EWebComponentException | if the Web Component can not be added |
References TdjWebComponentHandler::AddWithMapping(), TdjWebComponentHolder::GetContext(), TdjWebComponentHolder::SetContext(), and TdjWebComponentHolder::WebComponentClass.
|
protected |
Target | Request target |
Context | HTTP server context |
Request | HTTP request |
Response | HTTP response |
References TdjContextHandler::ContextPath, and TdjWebComponentHandler::Handle().
Referenced by Handle().
TdjWebComponentContextHandler::Handle | ( | string | Target, |
TdjServerContext | Context, | ||
TdjRequest | Request, | ||
TdjResponse | Response | ||
) |
Handle a HTTP request.
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 |
References TdjContextHandler::ContextMatches(), DoHandle(), TdjHandlerWrapper::GetSession(), and TdjContextHandler::ToConnectorName().