dbp::apache_application Class Reference

Apache application class. More...

#include <apache_application.h>

Inheritance diagram for dbp::apache_application:
Inheritance graph
[legend]
Collaboration diagram for dbp::apache_application:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 apache_application ()
 Constructor.
virtual void on_handle_request (on_request_handler handler)
 Register a custom web request handler.
virtual void on_exception (on_exception_handler handler)
 Register a custom exception handler.

Static Public Member Functions

static void apache_register_hooks (apr_pool_t *)

Protected Member Functions

virtual http_request get_request ()
virtual void send_response (const http_response &response)

Detailed Description

Apache application class.

The apache web server is a most popular web server in the world. It supports extending with an own API by plugins (apache modules), which are dynamic libraries by nature.

This class implements the web aplication as the apache module (extension of the apache web server).

See the 'examples/hello_world/apache_module' directory for the apache module skeleton application based on apache_application class.


Member Function Documentation

virtual void dbp::apache_application::on_exception ( on_exception_handler  handler  )  [inline, virtual]

Register a custom exception handler.

By default, the web application returns the '500 Internal Server Error' HTTP error code on exceptions occured, but you can customize the default exceptions handling by registering your handler.

Parameters:
handler the exception handler delegate.

Implements dbp::web_application_int.

virtual void dbp::apache_application::on_handle_request ( on_request_handler  handler  )  [inline, virtual]

Register a custom web request handler.

To make your application doing something useful, you should register your web request handler.

This handler is a web application entry point. When client is passing the request, it comes to a web server, processed with it and delivers to the application. You can obtain web request fields via http_request parameter.

After processing of the request you should to deliver the appropriate response to a client via web server by returning initialized http_response object.

The 'examples/hello_world/cgi_application' directory contains the source code of the web request handler implementation example.

Parameters:
handler the request handler delegate.

Implements dbp::web_application_int.


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

 
Support This Project
SourceForge.net Logo