CppCMS
|
This class provides an access to session management backends an allow customization. More...
#include <cppcms/session_pool.h>
Public Member Functions | |
session_pool (service &srv) | |
session_pool (json::value const &v) | |
~session_pool () | |
void | init () |
booster::shared_ptr< session_api > | get () |
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 |
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
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
cppcms::session_pool::~session_pool | ( | ) |
Destructor
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
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
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