\section{cppcms\+:\+:applications\+\_\+pool Class Reference}
\label{classcppcms_1_1applications__pool}\index{cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}}


Application pool is the central class that holds user created applications.  




{\ttfamily \#include $<$cppcms/applications\+\_\+pool.\+h$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct {\bf factory}
\begin{DoxyCompactList}\small\item\em a base class for user application factories -\/ to be deprecated, use \doxyref{application\+\_\+specific\+\_\+pool}{p.}{classcppcms_1_1application__specific__pool} instead \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void {\bf mount} (std\+::auto\+\_\+ptr$<$ {\bf factory} $>$ aps)
\item 
void {\bf mount} (std\+::auto\+\_\+ptr$<$ {\bf factory} $>$ aps, {\bf mount\+\_\+point} const \&point)
\item 
void {\bf mount} ({\bf booster\+::intrusive\+\_\+ptr}$<$ {\bf application} $>$ app)
\item 
void {\bf mount} ({\bf booster\+::intrusive\+\_\+ptr}$<$ {\bf application} $>$ app, {\bf mount\+\_\+point} const \&point)
\item 
void {\bf mount} ({\bf booster\+::shared\+\_\+ptr}$<$ {\bf application\+\_\+specific\+\_\+pool} $>$ gen, int application\+\_\+options=0)
\item 
void {\bf mount} ({\bf booster\+::shared\+\_\+ptr}$<$ {\bf application\+\_\+specific\+\_\+pool} $>$ gen, {\bf mount\+\_\+point} const \&point, int application\+\_\+options=0)
\item 
void {\bf unmount} ({\bf booster\+::weak\+\_\+ptr}$<$ {\bf application\+\_\+specific\+\_\+pool} $>$ gen)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Application pool is the central class that holds user created applications. 

Form the user perspective this class provides an A\+PI for mounting user application to the Cpp\+C\+MS service.

There are two kind of {\itshape mount} member functions, that allow\+:


\begin{DoxyItemize}
\item Mounting a {\itshape factory} of user applications -- for execution of synchronous requests by multiple instances of application.
\item Mounting single application -- for processing asynchronous requests by single instance of an application
\end{DoxyItemize}

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. 

\subsection{Member Function Documentation}
\index{cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}!mount@{mount}}
\index{mount@{mount}!cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}}
\subsubsection[{mount(std\+::auto\+\_\+ptr$<$ factory $>$ aps)}]{\setlength{\rightskip}{0pt plus 5cm}void cppcms\+::applications\+\_\+pool\+::mount (
\begin{DoxyParamCaption}
\item[{std\+::auto\+\_\+ptr$<$ {\bf factory} $>$}]{aps}
\end{DoxyParamCaption}
)}\label{classcppcms_1_1applications__pool_a190d75c5f93abbe2365f2f37ef7b0977}
Mount an application factory {\itshape aps} for processing of any incoming requests. Application would receive P\+A\+T\+H\+\_\+\+I\+N\+FO C\+GI variable for U\+RL matching.

This member function is thread safe.

\begin{DoxyRefDesc}{Deprecated}
\item[{\bf Deprecated}]Use \doxyref{mount(booster\+::shared\+\_\+ptr$<$application\+\_\+specific\+\_\+pool$>$ gen,int application\+\_\+options)}{p.}{classcppcms_1_1applications__pool_a00db03788459250a105a63e1cfde7d8a} instead \end{DoxyRefDesc}
\index{cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}!mount@{mount}}
\index{mount@{mount}!cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}}
\subsubsection[{mount(std\+::auto\+\_\+ptr$<$ factory $>$ aps, mount\+\_\+point const \&point)}]{\setlength{\rightskip}{0pt plus 5cm}void cppcms\+::applications\+\_\+pool\+::mount (
\begin{DoxyParamCaption}
\item[{std\+::auto\+\_\+ptr$<$ {\bf factory} $>$}]{aps, }
\item[{{\bf mount\+\_\+point} const \&}]{point}
\end{DoxyParamCaption}
)}\label{classcppcms_1_1applications__pool_ad02e20c6259dd131b9550ba0f3d5f041}
Mount an application factory {\itshape app} by \doxyref{mount\+\_\+point}{p.}{classcppcms_1_1mount__point} {\itshape point} application matching and U\+RL selection rules

This member function is thread safe.

\begin{DoxyRefDesc}{Deprecated}
\item[{\bf Deprecated}]Use \doxyref{mount(booster\+::shared\+\_\+ptr$<$application\+\_\+specific\+\_\+pool$>$ gen,mount\+\_\+point const \&point,int application\+\_\+options)}{p.}{classcppcms_1_1applications__pool_aee865cfed576d1b3ddc0eb190ba12ab9} instead \end{DoxyRefDesc}
\index{cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}!mount@{mount}}
\index{mount@{mount}!cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}}
\subsubsection[{mount(booster\+::intrusive\+\_\+ptr$<$ application $>$ app)}]{\setlength{\rightskip}{0pt plus 5cm}void cppcms\+::applications\+\_\+pool\+::mount (
\begin{DoxyParamCaption}
\item[{{\bf booster\+::intrusive\+\_\+ptr}$<$ {\bf application} $>$}]{app}
\end{DoxyParamCaption}
)}\label{classcppcms_1_1applications__pool_a5df195e454c857c4c064f8593c76fc45}
Mount an asynchronous application {\itshape app} for processing of any incoming requests. Application would receive P\+A\+T\+H\+\_\+\+I\+N\+FO C\+GI variable for U\+RL matching.

This member function is thread safe.

\begin{DoxyRefDesc}{Deprecated}
\item[{\bf Deprecated}]Use \doxyref{mount(booster\+::shared\+\_\+ptr$<$application\+\_\+specific\+\_\+pool$>$ gen,int application\+\_\+options)}{p.}{classcppcms_1_1applications__pool_a00db03788459250a105a63e1cfde7d8a} with application\+\_\+options=\doxyref{app\+::asynchronous}{p.}{namespacecppcms_1_1app_a6e1f18add53bf1b4e590de8c9fee3dcd} instead \end{DoxyRefDesc}
\index{cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}!mount@{mount}}
\index{mount@{mount}!cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}}
\subsubsection[{mount(booster\+::intrusive\+\_\+ptr$<$ application $>$ app, mount\+\_\+point const \&point)}]{\setlength{\rightskip}{0pt plus 5cm}void cppcms\+::applications\+\_\+pool\+::mount (
\begin{DoxyParamCaption}
\item[{{\bf booster\+::intrusive\+\_\+ptr}$<$ {\bf application} $>$}]{app, }
\item[{{\bf mount\+\_\+point} const \&}]{point}
\end{DoxyParamCaption}
)}\label{classcppcms_1_1applications__pool_a3fefe91fd5a4012ae0cf66aecc0bcbc4}
Mount an asynchronous application {\itshape app} by \doxyref{mount\+\_\+point}{p.}{classcppcms_1_1mount__point} {\itshape point} application matching and U\+RL selection rules

This member function is thread safe.

\begin{DoxyRefDesc}{Deprecated}
\item[{\bf Deprecated}]Use \doxyref{mount(booster\+::shared\+\_\+ptr$<$application\+\_\+specific\+\_\+pool$>$ gen,mount\+\_\+point const \&point,int application\+\_\+options)}{p.}{classcppcms_1_1applications__pool_aee865cfed576d1b3ddc0eb190ba12ab9} with application\+\_\+options=\doxyref{app\+::asynchronous}{p.}{namespacecppcms_1_1app_a6e1f18add53bf1b4e590de8c9fee3dcd} instead \end{DoxyRefDesc}
\index{cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}!mount@{mount}}
\index{mount@{mount}!cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}}
\subsubsection[{mount(booster\+::shared\+\_\+ptr$<$ application\+\_\+specific\+\_\+pool $>$ gen, int application\+\_\+options=0)}]{\setlength{\rightskip}{0pt plus 5cm}void cppcms\+::applications\+\_\+pool\+::mount (
\begin{DoxyParamCaption}
\item[{{\bf booster\+::shared\+\_\+ptr}$<$ {\bf application\+\_\+specific\+\_\+pool} $>$}]{gen, }
\item[{int}]{application\+\_\+options = {\ttfamily 0}}
\end{DoxyParamCaption}
)}\label{classcppcms_1_1applications__pool_a00db03788459250a105a63e1cfde7d8a}
Mount a \doxyref{application\+\_\+specific\+\_\+pool}{p.}{classcppcms_1_1application__specific__pool} for an application that processes all requests, path provided to application\textquotesingle{}s main is P\+A\+T\+H\+\_\+\+I\+N\+FO

{\itshape application\+\_\+options} allow to specify mode of operation -\/ synchronous, asynchronous, see namespace \doxyref{cppcms\+::app}{p.}{namespacecppcms_1_1app}

Note\+: \doxyref{applications\+\_\+pool}{p.}{classcppcms_1_1applications__pool} owns gen now and is responsible for destroying it

This member function is thread safe.

\doxyref{New in Cpp\+C\+MS 1.\+2}{p.}{v1_2} \index{cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}!mount@{mount}}
\index{mount@{mount}!cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}}
\subsubsection[{mount(booster\+::shared\+\_\+ptr$<$ application\+\_\+specific\+\_\+pool $>$ gen, mount\+\_\+point const \&point, int application\+\_\+options=0)}]{\setlength{\rightskip}{0pt plus 5cm}void cppcms\+::applications\+\_\+pool\+::mount (
\begin{DoxyParamCaption}
\item[{{\bf booster\+::shared\+\_\+ptr}$<$ {\bf application\+\_\+specific\+\_\+pool} $>$}]{gen, }
\item[{{\bf mount\+\_\+point} const \&}]{point, }
\item[{int}]{application\+\_\+options = {\ttfamily 0}}
\end{DoxyParamCaption}
)}\label{classcppcms_1_1applications__pool_aee865cfed576d1b3ddc0eb190ba12ab9}
Mount a \doxyref{application\+\_\+specific\+\_\+pool}{p.}{classcppcms_1_1application__specific__pool} to a specific mount point

{\itshape application\+\_\+options} allow to specify mode of operation -\/ synchronous, asynchronous, see namespace \doxyref{cppcms\+::app}{p.}{namespacecppcms_1_1app}

Note\+: \doxyref{applications\+\_\+pool}{p.}{classcppcms_1_1applications__pool} owns gen now and is responsible for destroying it

This member function is thread safe.

\doxyref{New in Cpp\+C\+MS 1.\+2}{p.}{v1_2} \index{cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}!unmount@{unmount}}
\index{unmount@{unmount}!cppcms\+::applications\+\_\+pool@{cppcms\+::applications\+\_\+pool}}
\subsubsection[{unmount(booster\+::weak\+\_\+ptr$<$ application\+\_\+specific\+\_\+pool $>$ gen)}]{\setlength{\rightskip}{0pt plus 5cm}void cppcms\+::applications\+\_\+pool\+::unmount (
\begin{DoxyParamCaption}
\item[{{\bf booster\+::weak\+\_\+ptr}$<$ {\bf application\+\_\+specific\+\_\+pool} $>$}]{gen}
\end{DoxyParamCaption}
)}\label{classcppcms_1_1applications__pool_a315961ad0c7d9ddb620b395802b6c291}
Unmount an \doxyref{application\+\_\+specific\+\_\+pool}{p.}{classcppcms_1_1application__specific__pool} from the general pool.

Notes\+:


\begin{DoxyItemize}
\item Exiting request would continue to be executed
\item There is no guarantee when and in which thread application objects would be destroyed upon use of unmount
\item applications in the pool using thread\+\_\+specific policy would be destroyed only on thread exit (i.\+e. when threads of thread pool are destroyed)
\end{DoxyItemize}

This member function is thread safe.

\doxyref{New in Cpp\+C\+MS 1.\+2}{p.}{v1_2} 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
cppcms/applications\+\_\+pool.\+h\end{DoxyCompactItemize}
