Home | Trees | Index | Help |
|
---|
Package Modeling :: Package utilities :: Module EditingContextSessioning |
|
EditingContextSessioning provides a set of functions that can be used to bind to an existing sessioning mechanism so that each existing session has its own EditingContext.
Typical usage:
- a session creates its EditingContext, either explicitly by instanciating one and registering it with registerEditingContext(), or lazily by simply calling getEditingContext() with 'create=1' when needed.
- The session calls getEditingContext() to retrieve its own EC.
- When the session is about to be destroyed, it calls unregisterEditingContext()
The session_id parameter required by all three methods must be a valid key object for python dictionary.
MT-status: MT-safe
CVS: $Id: EditingContextSessioning.py,v 1.2 2004/07/20 06:21:57 sbigaret Exp $
Function Summary | |
---|---|
Returns the EditingContext registered for a given session | |
Associates 'editingContext' to 'session_id'. | |
Unregisters the EditingContext corresponding to 'session_id'. |
Variable Summary | |
---|---|
str |
__version__ = '1.2'
|
_RLock |
editingContextPerSession_lock = <_RLock(None, 0)>
|
dict |
__editingContextPerSession = {}
|
instancemethod |
lock = threading._RLock.acquire |
instancemethod |
unlock = threading._RLock.release |
Function Details |
---|
getEditingContext(session_id, create=1)Returns the EditingContext registered for a given session Parameters:
|
registerEditingContext(session_id, editingContext)Associates 'editingContext' to 'session_id'. Any previously registered editing context for this session_id is silently dropped. |
unregisterEditingContext(session_id, dispose=1)Unregisters the EditingContext corresponding to 'session_id'. It silently returns if no EditingContext was registered for 'session_id'. Parameters:
|
Variable Details |
---|
__version__
|
editingContextPerSession_lock
|
__editingContextPerSession
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:21 2006 | http://epydoc.sf.net |