|
Daraja HTTP Framework 3.2.1-SNAPSHOT
HTTP server framework for Object Pascal
|
The context handler class used by applications. More...
Public Member Functions | |
| TdjWebComponentHolder | Add (TdjWebComponentClass ComponentClass, const string UrlPattern) |
| Add a Web Component. | |
| TdjWebFilterHolder | Add (TdjWebFilterClass FilterClass, const string UrlPattern) |
| Add a Web Filter, specifying a WebFilter class. | |
| AddHandler (const IHandler Handler) | |
| Add a handler to the container. | |
| TdjWebComponentHolder | AddWebComponent (TdjWebComponentClass ComponentClass, const string UrlPattern) |
| Add a Web Component. | |
| TdjWebFilterHolder | AddWebFilter (TdjWebFilterClass FilterClass, const string UrlPattern) |
| Add a Web Filter, specifying a WebFilter class. | |
| IContext | GetCurrentContext () |
| The internal IContext field. | |
| RemoveHandler (const IHandler Handler) | |
| SetInitParameter (const string Key, const string Value) | |
| Set initialization parameter. | |
Public Attributes | |
| TStrings | ConnectorNames |
| string | ContextPath |
| IHandler | ErrorHandler |
| IHandler | Handler |
Protected Member Functions | |
| Boolean | ContextMatches (const string ConnectorName, const string Target) |
| Check if the Document matches this context. | |
| DoHandle (const string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
| DoStart () | |
| Start the handler. | |
| DoStop () | |
| Stop the handler. | |
| TIdHTTPSession | GetSession (TdjServerContext Context, TdjRequest Request, TdjResponse Response, const Boolean Create) |
| Get a HTTP session. | |
| Handle (const string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
| string | ToConnectorName (TdjServerContext Context) |
| Creates connector name in the form 'host:port'. | |
The context handler class used by applications.
It is currently a straight alias of TdjWebComponentContextHandler, kept as the documented public name and an extension point for web-application specific behaviour.
|
inherited |
Add a Web Component.
| ComponentClass | WebComponent class |
| UrlPattern | path specification |
| EWebComponentException | if the Web Component can not be added |
References TdjWebComponentContextHandler().
Referenced by TdjWebComponentContextHandler(), and DoHandle().
|
inherited |
Add a Web Filter, specifying a WebFilter class.
| FilterClass | WebFilter class |
| UrlPattern | path specification |
| Exception | if the WebFilter can not be added |
|
inherited |
Add a handler to the container.
This implementation of AddHandler calls SetHandler with the passed handler. If this HandlerWrapper had a previous wrapped handler, then it is passed to a call to AddHandler on the passed handler.
| Handler | the handler to be added |
Referenced by TdjWebComponentContextHandler::AddWebFilter(), TdjServer::GetConnector(), and GetSession().
|
inherited |
Add a Web Component.
Ownership: the returned holder belongs to the context. Use it only for further configuration (init parameters etc.); do not free it or keep it past the lifetime of the context.
| ComponentClass | WebComponent class |
| UrlPattern | path specification |
| EWebComponentException | if the Web Component can not be added |
|
inherited |
Add a Web Filter, specifying a WebFilter class.
Ownership: the returned holder belongs to the context. Use it only for further configuration; do not free it or keep it past the lifetime of the context. If the filter cannot be added the holder is freed before the exception propagates.
| FilterClass | WebFilter class |
| UrlPattern | path specification |
| Exception | if the WebFilter can not be added |
References TdjHandlerWrapper::AddHandler().
|
protectedinherited |
Check if the Document matches this context.
| ConnectorName | the connector name (like 'host:port' |
| Target | the target URL document |
|
protectedinherited |
| Target | Request target |
| Context | HTTP server context |
| Request | HTTP request |
| Response | HTTP response |
References Add().
|
protectedinherited |
Start the handler.
|
protectedinherited |
Stop the handler.
|
protectedinherited |
Get a HTTP session.
References AddHandler(), and Handler.
|
protectedinherited |
References TdjContextHandler::ContextPath.
|
inherited |
|
inherited |
Set initialization parameter.
| Key | init parameter name (case-sensitive) |
| Value | init parameter value |
| EWebComponentException | if the key is already set |
|
protectedinherited |
Creates connector name in the form 'host:port'.
|
inherited |
|
inherited |
Referenced by TdjWebComponentContextHandler::Handle().
|
inherited |
|
inherited |
Referenced by TdjServer::ConnectorCount(), DoStart(), and GetSession().