|
Daraja HTTP Framework 3.0.7-SNAPSHOT
HTTP server framework for Object Pascal
|
Defines a generic Web Component. More...
Public Member Functions | |
| TdjGenericWebComponent () | |
| Constructor. | |
| ~TdjGenericWebComponent () | |
| Destructor. | |
| 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. | |
| Init () | |
| A convenience method which can be overridden so that there is no need to call inherited Init(config). | |
| Init (const IWebComponentConfig Config) | |
| Called by the container on startup. | |
| Service (TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
| Handle a HTTP request. | |
Public Attributes | |
| IWebComponentConfig | Config |
Defines a generic Web Component.
| TdjGenericWebComponent::TdjGenericWebComponent | ( | ) |
Constructor.
References TdjGenericWebComponent(), and Create().
Referenced by TdjGenericWebComponent(), and ~TdjGenericWebComponent().
| TdjGenericWebComponent::~TdjGenericWebComponent | ( | ) |
Destructor.
References TdjGenericWebComponent(), Config, and Init().
| 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. |
Implements IWebComponent.
| TdjGenericWebComponent::Init | ( | ) |
A convenience method which can be overridden so that there is no need to call inherited Init(config).
| TdjGenericWebComponent::Init | ( | const IWebComponentConfig | Config | ) |
Called by the container on startup.
| Config | the configuration |
| EWebComponentException | if initialization failed |
Implements IWebComponent.
Referenced by ~TdjGenericWebComponent().
| TdjGenericWebComponent::Service | ( | TdjServerContext | Context, |
| TdjRequest | Request, | ||
| TdjResponse | Response ) |
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 |
Implements IWebComponent.
| IWebComponentConfig TdjGenericWebComponent::Config |
Referenced by ~TdjGenericWebComponent().