BigBrotherBot v1.9.0
System Development Information for the BigBrotherBot project.

b3::lib::beaker::session::Session Class Reference

Inheritance diagram for b3::lib::beaker::session::Session:
b3::lib::beaker::session::CookieSession

List of all members.

Public Member Functions

def __init__
def created
def delete
def invalidate
def load
def save
def revert
def lock
def unlock

Public Attributes

 type
 namespace_class
 namespace_args
 request
 data_dir
 key
 timeout
 use_cookies
 cookie_expires
 was_invalidated
 secret
 secure
 id
 accessed_dict
 cookie
 is_new
 last_accessed
 namespace

Properties

 created = property(created)
 domain = property(_get_domain, _set_domain)
 path = property(_get_path, _set_path)

Private Member Functions

def _create_id
def _set_domain
def _get_domain
def _set_path
def _get_path
def _delete_cookie

Private Attributes

 _domain
 _path

Detailed Description

Session object that uses container package for storage.

``key``
    The name the cookie should be set to.
``timeout``
    How long session data is considered valid. This is used 
    regardless of the cookie being present or not to determine
    whether session data is still valid.
``cookie_domain``
    Domain to use for the cookie.
``secure``
    Whether or not the cookie should only be sent over SSL.

Constructor & Destructor Documentation

def b3::lib::beaker::session::Session::__init__ (   self,
  request,
  id = None,
  invalidate_corrupt = False,
  use_cookies = True,
  type = None,
  data_dir = None,
  key = 'beaker.session.id',
  timeout = None,
  cookie_expires = True,
  cookie_domain = None,
  secret = None,
  secure = False,
  namespace_class = None,
  namespace_args 
)

Member Function Documentation

def b3::lib::beaker::session::Session::_create_id (   self) [private]
def b3::lib::beaker::session::Session::_delete_cookie (   self) [private]
def b3::lib::beaker::session::Session::_get_domain (   self) [private]
def b3::lib::beaker::session::Session::_get_path (   self) [private]
def b3::lib::beaker::session::Session::_set_domain (   self,
  domain 
) [private]
def b3::lib::beaker::session::Session::_set_path (   self,
  path 
) [private]
def b3::lib::beaker::session::Session::created (   self)
def b3::lib::beaker::session::Session::delete (   self)
Deletes the session from the persistent storage, and sends
an expired cookie out

Reimplemented in b3::lib::beaker::session::CookieSession.

def b3::lib::beaker::session::Session::invalidate (   self)
Invalidates this session, creates a new session id, returns
to the is_new state

Reimplemented in b3::lib::beaker::session::CookieSession.

def b3::lib::beaker::session::Session::load (   self)
def b3::lib::beaker::session::Session::lock (   self)
Locks this session against other processes/threads.  This is
automatic when load/save is called.

***use with caution*** and always with a corresponding 'unlock'
inside a "finally:" block, as a stray lock typically cannot be
unlocked without shutting down the whole application.

def b3::lib::beaker::session::Session::revert (   self)
Revert the session to its original state from its first
access in the request
def b3::lib::beaker::session::Session::save (   self,
  accessed_only = False 
)
Saves the data for this session to persistent storage

If accessed_only is True, then only the original data loaded
at the beginning of the request will be saved, with the updated
last accessed time.

Reimplemented in b3::lib::beaker::session::CookieSession.

def b3::lib::beaker::session::Session::unlock (   self)
Unlocks this session against other processes/threads.  This
is automatic when load/save is called.

***use with caution*** and always within a "finally:" block, as
a stray lock typically cannot be unlocked without shutting down
the whole application.


Member Data Documentation


Property Documentation

b3::lib::beaker::session::Session::created = property(created) [static]
b3::lib::beaker::session::Session::domain = property(_get_domain, _set_domain) [static]
b3::lib::beaker::session::Session::path = property(_get_path, _set_path) [static]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties