CppCMS

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Classes | Public Member Functions | List of all members
cppcms::applications_pool Class Reference

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)

## Detailed Description

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:

- Mounting a factory of user applications – for execution of synchronous requests by multiple instances of application.
- Mounting single application – for processing asynchronous requests by single instance of an application

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.

## Member Function Documentation

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.

Deprecated:
  Use mount(booster::shared_ptr<application_specific_pool> gen,int application_options) instead

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.

Deprecated:
  Use mount(booster::shared_ptr<application_specific_pool> gen,mount_point const &point,int application_options) instead

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.

Deprecated:
  Use mount(booster::shared_ptr<application_specific_pool> gen,int application_options) with application_options=app::asynchronous instead

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.

Deprecated:
  Use mount(booster::shared_ptr<application_specific_pool> gen,mount_point const &point,int application_options) with application_options=app::asynchronous instead

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.

New in CppCMS 1.2

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.

New in CppCMS 1.2

void cppcms::applications_pool::unmount | ( | booster::weak_ptr< application_specific_pool > | gen | ) |

Unmount an application_specific_pool from the general pool.

Notes:

- Exiting request would continue to be executed
- There is no guarantee when and in which thread application objects would be destroyed upon use of unmount
- applications in the pool using thread_specific policy would be destroyed only on thread exit (i.e. when threads of thread pool are destroyed)

This member function is thread safe.

New in CppCMS 1.2

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

- cppcms/applications_pool.h