twisted :: web :: server :: Session :: Class Session
[hide private]

Class Session

 persisted.styles.Versioned --+    
                              |    
python.components.Componentized --+
                                  |
                                 Session
Known Subclasses:

A user's session with a system.

This utility class contains no functionality, but is used to represent a session.

Instance Methods [hide private]
 
__init__(self, site, uid, reactor=None)
Initialize a session with a unique ID for that session.
 
checkExpired(self)
Deprecated; does nothing.
 
expire(self)
Expire/logout of the session.
 
notifyOnExpire(self, callback)
Call this callback when the session expires or logs out.
 
startCheckingExpiration(self, lifetime=None)
Start expiration tracking.
 
touch(self)
Notify session modification.

Inherited from python.components.Componentized: __conform__, __provides__, addAdapter, addComponent, getComponent, locateAdapterClass, removeComponent, setAdapter, setComponent, unsetComponent

Inherited from persisted.styles.Versioned: __getstate__, __providedBy__, __setstate__, versionUpgrade

Class Variables [hide private]
  _expireCall = None
hash(x)

Inherited from python.components.Componentized: __implemented__, persistenceVersion

Inherited from persisted.styles.Versioned: persistenceForgets

Instance Variables [hide private]
  _reactor
An object providing IReactorTime to use for scheduling expiration.
  loopFactory
Deprecated in Twisted 9.0.
  sessionTimeout = 900
timeout of a session, in seconds.
Method Details [hide private]

__init__(self, site, uid, reactor=None)
(Constructor)

 

Initialize a session with a unique ID for that session.

Overrides: python.components.Componentized.__init__

startCheckingExpiration(self, lifetime=None)

 

Start expiration tracking.

Parameters:
  • lifetime - Ignored; deprecated.
Returns:
None

Instance Variable Details [hide private]

loopFactory

Deprecated in Twisted 9.0. Does nothing. Do not use.
Value:
twisted.internet.task.LoopingCall