Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

QHttpServletRunner Class Reference

This class manages the interface between the HTTP server and the servlets. More...

#include <qhttpservletrunner.h>

List of all members.

Public Methods

 QHttpServletRunner ()
virtual ~QHttpServletRunner ()
QServletContextcontext ()
void addServlet (const char *path, QHttpServlet *sv)
bool removeServlet (const char *path)
QHttpServletRequestcreateRequest (QTextStream *in)
QHttpServletResponsecreateResponse (QIODevice *out, QHttpServletRequest *req)
bool processRequest (QHttpServletRequest *req, QHttpServletResponse *res)
QHttpServletfindServlet (QHttpServletRequest *req)


Detailed Description

This class manages the interface between the HTTP server and the servlets.

Author:
Richard Moore

Definition at line 22 of file qhttpservletrunner.h.


Member Function Documentation

void QHttpServletRunner::addServlet const char *    path,
QHttpServlet   sv
 

Makes the specified servlet available at the specified path.

Note that the runner takes ownership of the servlet and will delete it if the servlet is removed.

bool QHttpServletRunner::processRequest QHttpServletRequest   req,
QHttpServletResponse   res
 

This method is called when the HTTP server asks us to handle a request.

It despatches the request to the appropriate servlet which will populate the response object. If there is no servlet that can handle the request then a 404 response will be generated. This method returns true if the request was successfully handled, false otherwise.

bool QHttpServletRunner::removeServlet const char *    path
 

Removes the servlet that is mapped at the specified path.

Returns false if no servlet was mapped at the path.


The documentation for this class was generated from the following file:
Generated on Wed Apr 9 23:50:22 2003 for QXServlet by doxygen1.2.17