|
Daraja HTTP Framework 3.1.1-SNAPSHOT
HTTP server framework for Object Pascal
|
Context Handler for Web Components (and Web Filters). More...
Public Member Functions | |
| TdjWebComponentContextHandler (const string ContextPath, Boolean Sessions=False) | |
| Constructor. | |
| ~TdjWebComponentContextHandler () | |
| Destructor. | |
| 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. | |
| string | GetContextPath () |
| IContext | GetCurrentContext () |
| The internal IContext field. | |
| IHandler | GetHandler () |
| Boolean | IsStarted () |
| Boolean | IsStopped () |
| RemoveHandler (const IHandler Handler) | |
| Removes a handler from this container. | |
| SetErrorHandler (const IHandler Value) | |
| SetHandler (const IHandler Value) | |
| SetInitParameter (const string Key, const string Value) | |
| Set initialization parameter. | |
| SetStarted (const Boolean Value) | |
| SetStopped (const Boolean Value) | |
| Start () | |
| Starts the component. | |
| Stop () | |
| Stops the component. | |
Public Attributes | |
| Boolean | AutoStartSession |
| TStrings | ConnectorNames |
| string | ContextPath |
| TCriticalSection | CS |
| IHandler | ErrorHandler |
| TStrings | FConnectorNames |
| IContext | FContext |
| IHandler | FErrorHandler |
| IHandler | FHandler |
| Boolean | FStopped |
| IHandler | Handler |
| Boolean | Started |
| Boolean | Stopped |
| TdjWebComponentHandler | WebComponentHandler |
Protected Member Functions | |
| CheckStarted () | |
| Raises an exception if the lifecycle is in "started" state. | |
| CheckStopped () | |
| Raises an exception if the lifecycle is in "stopped" state. | |
| 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 () | |
| Start 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) | |
| Handles an HTTP request. | |
| string | ToConnectorName (TdjServerContext Context) |
| Creates connector name in the form 'host:port'. | |
Context Handler for Web Components (and Web Filters).
| TdjWebComponentContextHandler::TdjWebComponentContextHandler | ( | const string | ContextPath, |
| Boolean | Sessions = False ) |
Constructor.
| ContextPath | the context path |
| Sessions | enable HTTP sessions |
Referenced by Add(), and AddWebComponent().
| TdjWebComponentContextHandler::~TdjWebComponentContextHandler | ( | ) |
Destructor.
| TdjWebComponentHolder TdjWebComponentContextHandler::Add | ( | TdjWebComponentClass | ComponentClass, |
| const string | UrlPattern ) |
Add a Web Component.
| ComponentClass | WebComponent class |
| UrlPattern | path specification |
| EWebComponentException | if the Web Component can not be added |
References TdjWebComponentContextHandler(), AutoStartSession, TdjContextHandler::ContextMatches(), DoHandle(), TdjHandlerWrapper::GetSession(), and TdjContextHandler::ToConnectorName().
| TdjWebFilterHolder TdjWebComponentContextHandler::Add | ( | TdjWebFilterClass | FilterClass, |
| const string | UrlPattern ) |
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 |
Implements IHandlerContainer.
| TdjWebComponentHolder TdjWebComponentContextHandler::AddWebComponent | ( | TdjWebComponentClass | ComponentClass, |
| const string | UrlPattern ) |
Add a Web Component.
| ComponentClass | WebComponent class |
| UrlPattern | path specification |
| EWebComponentException | if the Web Component can not be added |
References TdjWebComponentContextHandler(), AddWebFilter(), and WebComponentHandler.
| TdjWebFilterHolder TdjWebComponentContextHandler::AddWebFilter | ( | TdjWebFilterClass | FilterClass, |
| const string | UrlPattern ) |
Add a Web Filter, specifying a WebFilter class.
| FilterClass | WebFilter class |
| UrlPattern | path specification |
| Exception | if the WebFilter can not be added |
Referenced by AddWebComponent().
|
protectedinherited |
Raises an exception if the lifecycle is in "started" state.
|
protectedinherited |
Raises an exception if the lifecycle is in "stopped" state.
References TdjLifeCycle().
|
protectedinherited |
Check if the Document matches this context.
| ConnectorName | the connector name (like 'host:port' |
| Target | the target URL document |
Referenced by TdjWebComponentContextHandler::Add().
|
protected |
| Target | Request target |
| Context | HTTP server context |
| Request | HTTP request |
| Response | HTTP response |
Referenced by Add().
|
protectedinherited |
Start the handler.
|
protectedinherited |
Start the handler.
|
inherited |
|
inherited |
References Handler, and SetHandler().
|
protectedinherited |
Get a HTTP session.
References TdjHandlerWrapper(), FHandler, Handler, and SetHandler().
Referenced by TdjWebComponentContextHandler::Add().
|
protected |
Handles an HTTP request.
| Target | Target path or resource identifier |
| Context | Server context for this request |
| Request | HTTP request object |
| Response | HTTP response object to populate |
| EWebComponentException | if an exception occurs that interferes with the component's normal operation. |
Implements IHandler.
|
inherited |
Implements ILifeCycle.
References TdjLifeCycle().
Referenced by DoStart(), and TdjWebComponentHandler::InvokeService().
|
inherited |
Implements ILifeCycle.
References Create().
Referenced by DoStart().
|
inherited |
Removes a handler from this container.
| Handler | Handler to remove |
Implements IHandlerContainer.
|
inherited |
|
inherited |
References TdjHandlerWrapper(), Create(), and Handler.
Referenced by GetHandler(), and GetSession().
|
inherited |
Set initialization parameter.
| Key | init parameter name |
| Value | init parameter value |
|
inherited |
Referenced by DoStop().
|
inherited |
Referenced by DoStop().
|
inherited |
|
inherited |
Stops the component.
Implements ILifeCycle.
References Stopped.
Referenced by DoStart(), and TdjWebComponentHandler::InvokeService().
|
protectedinherited |
Creates connector name in the form 'host:port'.
Referenced by TdjWebComponentContextHandler::Add().
| Boolean TdjWebComponentContextHandler::AutoStartSession |
Referenced by Add().
|
inherited |
|
inherited |
|
inherited |
Referenced by ~TdjLifeCycle().
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Referenced by GetSession().
|
inherited |
Referenced by ~TdjLifeCycle(), and DoStop().
|
inherited |
Referenced by GetHandler(), GetSession(), and SetHandler().
|
inherited |
Referenced by TdjHandlerCollection::~TdjHandlerCollection(), and DoStop().
| TdjWebComponentHandler TdjWebComponentContextHandler::WebComponentHandler |
Referenced by AddWebComponent().