CppCMS
Classes | Public Member Functions | Friends | List of all members
cppcms::session_pool Class Reference

This class provides an access to session management backends an allow customization. More...

#include <cppcms/session_pool.h>

Inheritance diagram for cppcms::session_pool:
booster::noncopyable

Public Member Functions

 session_pool (service &srv)
 
 session_pool (json::value const &v)
 
 ~session_pool ()
 
void init ()
 
booster::shared_ptr< session_apiget ()
 
void backend (std::auto_ptr< session_api_factory > b)
 
void encryptor (std::auto_ptr< sessions::encryptor_factory > e)
 
void storage (std::auto_ptr< sessions::session_storage_factory > s)
 

Friends

struct cookies_factory
 
struct dual_factory
 
struct sid_factory
 
class session_interface
 
class gc_job
 

Detailed Description

This class provides an access to session management backends an allow customization.

When user implements its own session_api, sessions::encryptor or sessions::session_storage interfaces it may set their factories to these classes

Constructor & Destructor Documentation

cppcms::session_pool::session_pool ( service srv)

Constructor that is used together with CppCMS service

cppcms::session_pool::session_pool ( json::value const &  v)

Constructor that is used to create independent pool to access the session storage by external tools

New in CppCMS 1.2

cppcms::session_pool::~session_pool ( )

Destructor

Member Function Documentation

void cppcms::session_pool::backend ( std::auto_ptr< session_api_factory b)

Assign your own implementation of session_api passing pointer to session_api_factory.

void cppcms::session_pool::encryptor ( std::auto_ptr< sessions::encryptor_factory e)

Assign your own implementation of sessions::encryptor that would be used for client side session management by passing pointer to sessions::encryptor_factory

booster::shared_ptr<session_api> cppcms::session_pool::get ( )

Get an actual object that is used to store/retreive session data

New in CppCMS 1.2

void cppcms::session_pool::init ( )

Initialize the pool - must be called before get() can be used

Note: it allows to install custom session_api, encryptor or storage functionality

New in CppCMS 1.2

void cppcms::session_pool::storage ( std::auto_ptr< sessions::session_storage_factory s)

Assign your own implementation of sessions::session_storage that would be used for server side session management by passing pointer to sessions::session_storage_factory


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