Public Member Functions

HttpRequestHandler Class Reference

The request handler generates a response for each HTTP request. More...

#include <httprequesthandler.h>

Inheritance diagram for HttpRequestHandler:
DumpController FileUploadController FormController RequestMapper SessionController StaticFileController TemplateController

List of all members.

Public Member Functions

 HttpRequestHandler (QObject *parent=0)
 Constructor.
virtual ~HttpRequestHandler ()
 Destructor.
virtual void service (HttpRequest &request, HttpResponse &response)
 Generate a response for an incoming HTTP request.

Detailed Description

The request handler generates a response for each HTTP request.

Web Applications usually have one central request handler that maps incoming requests to several controllers (servlets) based on the requested path.

You need to override the service() method or you will always get an HTTP error 501.

Warning:
Be aware that the main request handler instance must be created on the heap and that it is used by multiple threads simultaneously.
See also:
StaticFileController which delivers static local files.

Definition at line 24 of file httprequesthandler.h.


Member Function Documentation

void HttpRequestHandler::service ( HttpRequest request,
HttpResponse response 
) [virtual]

Generate a response for an incoming HTTP request.

Parameters:
request The received HTTP request
response Must be used to return the response
Warning:
This method must be thread safe

Reimplemented in DumpController, FileUploadController, FormController, SessionController, TemplateController, RequestMapper, and StaticFileController.

Definition at line 14 of file httprequesthandler.cpp.


The documentation for this class was generated from the following files: