CppCMS
|
Application pool is the central class that holds user created applications. More...
#include <cppcms/applications_pool.h>
Classes | |
struct | factory |
a base class for user application factories - to be deprecated, use application_specific_pool instead More... | |
Public Member Functions | |
void | mount (std::auto_ptr< factory > aps) |
void | mount (std::auto_ptr< factory > aps, mount_point const &point) |
void | mount (booster::intrusive_ptr< application > app) |
void | mount (booster::intrusive_ptr< application > app, mount_point const &point) |
void | mount (booster::shared_ptr< application_specific_pool > gen, int application_options=0) |
void | mount (booster::shared_ptr< application_specific_pool > gen, mount_point const &point, int application_options=0) |
void | unmount (booster::weak_ptr< application_specific_pool > gen) |
Application pool is the central class that holds user created applications.
Form the user perspective this class provides an API for mounting user application to the CppCMS service.
There are two kind of mount member functions, that allow:
The life cycle of synchronous application is defined by application pool itself, and the life cycle of asynchronous depends on its own reference count.
This class is thread safe and can be accessed from multiple threads simultaneously.
void cppcms::applications_pool::mount | ( | std::auto_ptr< factory > | aps | ) |
Mount an application factory aps for processing of any incoming requests. Application would receive PATH_INFO CGI variable for URL matching.
This member function is thread safe.
void cppcms::applications_pool::mount | ( | std::auto_ptr< factory > | aps, |
mount_point const & | point | ||
) |
Mount an application factory app by mount_point point application matching and URL selection rules
This member function is thread safe.
void cppcms::applications_pool::mount | ( | booster::intrusive_ptr< application > | app | ) |
Mount an asynchronous application app for processing of any incoming requests. Application would receive PATH_INFO CGI variable for URL matching.
This member function is thread safe.
void cppcms::applications_pool::mount | ( | booster::intrusive_ptr< application > | app, |
mount_point const & | point | ||
) |
Mount an asynchronous application app by mount_point point application matching and URL selection rules
This member function is thread safe.
void cppcms::applications_pool::mount | ( | booster::shared_ptr< application_specific_pool > | gen, |
int | application_options = 0 |
||
) |
Mount a application_specific_pool for an application that processes all requests, path provided to application's main is PATH_INFO
application_options allow to specify mode of operation - synchronous, asynchronous, see namespace cppcms::app
Note: applications_pool owns gen now and is responsible for destroying it
This member function is thread safe.
void cppcms::applications_pool::mount | ( | booster::shared_ptr< application_specific_pool > | gen, |
mount_point const & | point, | ||
int | application_options = 0 |
||
) |
Mount a application_specific_pool to a specific mount point
application_options allow to specify mode of operation - synchronous, asynchronous, see namespace cppcms::app
Note: applications_pool owns gen now and is responsible for destroying it
This member function is thread safe.
void cppcms::applications_pool::unmount | ( | booster::weak_ptr< application_specific_pool > | gen | ) |
Unmount an application_specific_pool from the general pool.
Notes:
This member function is thread safe.