t.w.s.Session(components.Componentized) : class documentation

Part of twisted.web.server View Source View In Hierarchy

A user's session with a system.

This utility class contains no functionality, but is used to represent a session.
Instance VariablessessionTimeouttimeout of a session, in seconds.
loopFactoryfactory for creating task.LoopingCall. Mainly for testing.
Method __init__ Initialize a session with a unique ID for that session.
Method startCheckingExpiration Start expiration tracking.
Method notifyOnExpire Call this callback when the session expires or logs out.
Method expire Expire/logout of the session.
Method touch Notify session modification.
Method checkExpired Is it time for me to expire?
Method _getTime Return current time used for session validity.

Inherited from Componentized:

Method locateAdapterClass Undocumented
Method setAdapter Undocumented
Method addAdapter Utility method that calls addComponent. I take an adapter class and instantiate it with myself as the first argument.
Method setComponent Undocumented
Method addComponent Add a component to me, for all appropriate interfaces.
Method unsetComponent Remove my component specified by the given interface class.
Method removeComponent Remove the given component from me entirely, for all interfaces for which it has been registered.
Method getComponent Create or retrieve an adapter for the given interface.
Method __conform__ Undocumented

Inherited from Versioned (via Componentized):

Method __setstate__ Undocumented
Method __getstate__ Get state, adding a version number to it on its way out.
Method versionUpgrade (internal) Do a version upgrade.
def __init__(self, site, uid): (source)
Initialize a session with a unique ID for that session.
def startCheckingExpiration(self, lifetime): (source)
Start expiration tracking.
ParameterslifetimeThe number of seconds this session is allowed to be idle before it expires. (type: int or float )
ReturnsNone
def notifyOnExpire(self, callback): (source)
Call this callback when the session expires or logs out.
def expire(self): (source)
Expire/logout of the session.
def _getTime(self): (source)
Return current time used for session validity.
def touch(self): (source)
Notify session modification.
def checkExpired(self): (source)

Is it time for me to expire?

If I haven't been touched in fifteen minutes, I will call my expire method.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 15:57:47.