|
Daraja HTTP Framework 3.0.7-SNAPSHOT
HTTP server framework for Object Pascal
|
Context handler. More...
Public Member Functions | |
| TdjContextHandler (const string ContextPath) | |
| Create a ContextHandler. | |
| ~TdjContextHandler () | |
| Destructor. | |
| AddHandler (const IHandler Handler) | |
| Add a handler to the container. | |
| IContext | GetCurrentContext () |
| The internal IContext field. | |
| Boolean | IsStarted () |
| Boolean | IsStopped () |
| RemoveHandler (const IHandler Handler) | |
| Removes a handler from this container. | |
| SetInitParameter (const string Key, const string Value) | |
| Set initialization parameter. | |
| Start () | |
| Starts the component. | |
| Stop () | |
| Stops the component. | |
Public Attributes | |
| TStrings | ConnectorNames |
| string | ContextPath |
| IHandler | ErrorHandler |
| IHandler | Handler |
| Boolean | Started |
| Boolean | Stopped |
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. | |
| 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.
| TdjContextHandler::TdjContextHandler | ( | const string | ContextPath | ) |
Create a ContextHandler.
| TdjContextHandler::~TdjContextHandler | ( | ) |
Destructor.
|
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.
|
protectedinherited |
Raises an exception if the lifecycle is in "started" state.
References TdjLifeCycle().
|
protectedinherited |
Raises an exception if the lifecycle is in "stopped" state.
References TdjLifeCycle(), and Started.
|
protected |
Check if the Document matches this context.
| ConnectorName | the connector name (like 'host:port' |
| Target | the target URL document |
Referenced by TdjWebComponentContextHandler::AddWebComponent().
|
protected |
Start the handler.
|
protected |
Start the handler.
| IContext TdjContextHandler::GetCurrentContext | ( | ) |
The internal IContext field.
Referenced by TdjWebComponentContextHandler::TdjWebComponentContextHandler().
|
protectedinherited |
Get a HTTP session.
References TdjHandlerWrapper(), Create(), and Handler.
Referenced by TdjWebComponentContextHandler::AddWebComponent().
|
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 Create().
Referenced by DoStart(), and TdjWebComponentHandler::FindHolder().
|
inherited |
|
inherited |
Removes a handler from this container.
| Handler | Handler to remove |
Implements IHandlerContainer.
References Handler.
| TdjContextHandler::SetInitParameter | ( | const string | Key, |
| const string | Value ) |
Set initialization parameter.
| Key | init parameter name |
| Value | init parameter value |
|
inherited |
|
inherited |
Stops the component.
Implements ILifeCycle.
References TdjLifeCycle().
Referenced by DoStart(), and TdjWebComponentHandler::InvokeService().
|
protected |
Creates connector name in the form 'host:port'.
Referenced by TdjWebComponentContextHandler::AddWebComponent().
| TStrings TdjContextHandler::ConnectorNames |
| string TdjContextHandler::ContextPath |
Referenced by TdjWebComponentContextHandler::AddWebComponent().
| IHandler TdjContextHandler::ErrorHandler |
|
inherited |
Referenced by GetSession(), and RemoveHandler().
|
inherited |