Daraja HTTP Framework 3.0-MS1
HTTP server framework for Object Pascal
|
Defines a generic Web Component. More...
Public Member Functions | |
TdjGenericWebComponent () | |
Constructor. | |
~TdjGenericWebComponent () | |
Destructor. | |
Init (const IWebComponentConfig Config) | |
Called by the container on startup. | |
TIdHTTPSession | GetSession (TdjServerContext Context, TdjRequest Request, TdjResponse Response, const Boolean Create=True) |
Get or create a HTTP session. | |
IWebComponentConfig | GetWebComponentConfig () |
Returns a IWebComponentConfig object, which contains initialization parameters for this component. | |
Public Attributes | |
IWebComponentConfig | Config |
Protected Member Functions | |
Service (TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
Handle a HTTP request. | |
Defines a generic Web Component.
TIdHTTPSession TdjGenericWebComponent::GetSession | ( | TdjServerContext | Context, |
TdjRequest | Request, | ||
TdjResponse | Response, | ||
const Boolean | Create = True ) |
Get or create a HTTP session.
Context | HTTP server context |
Request | HTTP request |
Response | HTTP response |
Create | if True, create a session if no one exists |
IWebComponentConfig TdjGenericWebComponent::GetWebComponentConfig | ( | ) |
Returns a IWebComponentConfig object, which contains initialization parameters for this component.
EWebComponentException | if the method is called before the component has been initialized. |
TdjGenericWebComponent::Init | ( | const IWebComponentConfig | Config | ) |
Called by the container on startup.
Config | the configuration |
EWebComponentException | if initialization failed |
References Config.
|
protected |
Handle a HTTP request.
The status code of the response always should be set for a component that throws or sends an error.
Context | HTTP server context |
Request | HTTP request |
Response | HTTP response |
EWebComponentException | if an exception occurs that interferes with the component's normal operation |
IWebComponentConfig TdjGenericWebComponent::Config |
Referenced by Init().